Install metrics-server #1

Merged
allanger merged 10 commits from refs/pull/1/head into main 2023-02-18 17:46:07 +00:00
10 changed files with 151 additions and 0 deletions
Showing only changes of commit e60f35a6ae - Show all commits

25
.drone.yml Normal file
View File

@ -0,0 +1,25 @@
---
# ----------------------------------------------
# -- Helmfile apply changes
# ----------------------------------------------
kind: pipeline
type: kubernetes
name: Apply helmfile changes
trigger:
branch:
- main
event:
- push
steps:
- name: Publish the Helm chart
image: alpine/helm
environment:
GITEA_TOKEN:
from_secret: GITEA_TOKEN
commands:
- helm plugin install https://github.com/chartmuseum/helm-push
- helm package chart -d chart-package
- helm repo add --username allanger --password $GITEA_TOKEN allanger-charts https://git.badhouseplants.net/api/packages/allanger/helm
- helm cm-push "./chart-package/$(ls chart-package)" allanger-charts

View File

View File

@ -0,0 +1,8 @@
storageClassName: longhorn
openvpn:
server: "tcp://195.201.250.50:1194"
service:
type: ClusterIP
port: 1194
targetPort: 1194
protocol: TCP

View File

@ -0,0 +1,4 @@
apiService:
insecureSkipTLSVerify: true
args:
- --kubelet-insecure-tls

5
environments.yaml Normal file
View File

@ -0,0 +1,5 @@
environments:
badhouseplants:
kubeContext: allanger@badhouseplants-microk8s
etersoft:
kubeContext: allanger@etersoft

0
etersoft/helmfile.yaml Normal file
View File

View File

@ -0,0 +1,43 @@
storageClassName: microk8s-hostpath
openvpn:
server: "tcp://91.232.225.63:1194"
service:
type: ClusterIP
port: 1194
targetPort: 1194
protocol: TCP
istio-resources:
enabled: true
gateways:
- metadata:
name: etersoft-vpn
namespace: istio-system
spec:
selector:
istio: ingressgateway
servers:
- hosts:
- '*'
port:
name: openvpn
number: 1194
protocol: TCP
# virtual_services:
# - metadata:
# name: openvpn
# spec:
# hosts:
# - '*'
# gateways:
# - istio-system/etersoft-vpn
# tcp:
# - match:
# - port: 1194
# route:
# - destination:
# host: openvpn
# port:
# number: 1194
#
#
#

20
helmfile.yaml Normal file
View File

@ -0,0 +1,20 @@
---
{{ readFile "releases.yaml" }}
bases:
- environments.yaml
- repositories.yaml
releases:
- <<: *metrics-server
installed: true
namespace: kube-system
createNamespace: false
- <<: *openvpn
installed: false
namespace: openvpn-service
createNamespace: true
helmfiles:
- path: {{.Environment.Name }}/helmfile.yaml

40
releases.yaml Normal file
View File

@ -0,0 +1,40 @@
---
templates:
crd-management-hook:
hooks:
- events: ["preapply"]
showlogs: true
command: "sh"
args:
- -c
- "helm show crds {{ .Release.Chart }} --version {{ .Release.Version }}| kubectl apply -f -"
- events: ["prepare"]
showlogs: true
command: "sh"
args:
- -c
- "helm show crds {{ .Release.Chart }} --version {{ .Release.Version }} | kubectl diff -f - || true"
- events: ["postuninstall"]
showlogs: true
command: "sh"
args:
- -c
- "helm show crds {{ .Release.Chart }} --version {{ .Release.Version }} | kubectl delete -f -"
# ----------------------------
# -- Releases
# ----------------------------
metrics-server: &metrics-server
name: metrics-server
chart: metrics-server/metrics-server
version: 3.8.3
values:
- common/values.{{ .Release.Name }}.yaml
inherit:
- template: crd-management-hook
openvpn: &openvpn
name: openvpn
chart: allanger-charts/openvpn
version: 1.0.1
values:
- "{{ .Environment.Name }}/values/values.{{ .Release.Name }}.yaml"

6
repositories.yaml Normal file
View File

@ -0,0 +1,6 @@
---
repositories:
- name: metrics-server
url: https://kubernetes-sigs.github.io/metrics-server/
- name: allanger-charts
url: https://allanger.github.io/allanger-charts