Install metrics-server (#1)
Reviewed-on: https://git.badhouseplants.net/badhouseplants/k8s-cluster-config/pulls/1
This commit is contained in:
parent
5389830dd0
commit
1a667f001e
71
.drone.yml
Normal file
71
.drone.yml
Normal file
@ -0,0 +1,71 @@
|
||||
---
|
||||
# ----------------------------------------------
|
||||
# -- Helmfile diff changes
|
||||
# ----------------------------------------------
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: Show helmfile diffs
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
|
||||
steps:
|
||||
- name: Diff badhouseplants
|
||||
image: ghcr.io/helmfile/helmfile:canary
|
||||
environment:
|
||||
KUBECONFIG_CONTENT:
|
||||
from_secret: KUBECONFIG_CONTENT
|
||||
commands:
|
||||
- mkdir $HOME/.kube
|
||||
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
||||
- helmfile -e badhouseplants diff
|
||||
|
||||
- name: Diff eterosoft
|
||||
image: ghcr.io/helmfile/helmfile:canary
|
||||
environment:
|
||||
KUBECONFIG_CONTENT:
|
||||
from_secret: KUBECONFIG_CONTENT
|
||||
commands:
|
||||
- mkdir $HOME/.kube
|
||||
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
||||
- helmfile -e etersoft diff
|
||||
|
||||
---
|
||||
# ----------------------------------------------
|
||||
# -- Helmfile apply changes
|
||||
# ----------------------------------------------
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
name: Apply helmfile changes
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
- push
|
||||
|
||||
steps:
|
||||
- name: Diff badhouseplants
|
||||
image: ghcr.io/helmfile/helmfile:canary
|
||||
environment:
|
||||
KUBECONFIG_CONTENT:
|
||||
from_secret: KUBECONFIG_CONTENT
|
||||
commands:
|
||||
- mkdir $HOME/.kube
|
||||
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
||||
- helmfile -e badhouseplants apply
|
||||
|
||||
- name: Diff eterosoft
|
||||
image: ghcr.io/helmfile/helmfile:canary
|
||||
environment:
|
||||
KUBECONFIG_CONTENT:
|
||||
from_secret: KUBECONFIG_CONTENT
|
||||
commands:
|
||||
- mkdir $HOME/.kube
|
||||
- echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config
|
||||
- helmfile -e etersoft apply
|
||||
|
2
README.md
Normal file
2
README.md
Normal file
@ -0,0 +1,2 @@
|
||||
# Kubernetes configuration
|
||||
[![Build Status](https://drone.badhouseplants.net/api/badges/badhouseplants/k8s-cluster-config/status.svg)](https://drone.badhouseplants.net/badhouseplants/k8s-cluster-config)
|
0
badhouseplants/helmfile.yaml
Normal file
0
badhouseplants/helmfile.yaml
Normal file
8
badhouseplants/values/values.openvpn.yaml
Normal file
8
badhouseplants/values/values.openvpn.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
storageClassName: longhorn
|
||||
openvpn:
|
||||
server: "tcp://195.201.250.50:1194"
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 1194
|
||||
targetPort: 1194
|
||||
protocol: TCP
|
4
common/values.metrics-server.yaml
Normal file
4
common/values.metrics-server.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiService:
|
||||
insecureSkipTLSVerify: true
|
||||
args:
|
||||
- --kubelet-insecure-tls
|
5
environments.yaml
Normal file
5
environments.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
environments:
|
||||
badhouseplants:
|
||||
kubeContext: allanger@badhouseplants-microk8s
|
||||
etersoft:
|
||||
kubeContext: allanger@etersoft
|
0
etersoft/helmfile.yaml
Normal file
0
etersoft/helmfile.yaml
Normal file
43
etersoft/values/values.openvpn.yaml
Normal file
43
etersoft/values/values.openvpn.yaml
Normal 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
|
||||
#
|
||||
#
|
||||
#
|
15
helmfile.yaml
Normal file
15
helmfile.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
{{ readFile "releases.yaml" }}
|
||||
|
||||
bases:
|
||||
- environments.yaml
|
||||
- repositories.yaml
|
||||
|
||||
releases:
|
||||
- <<: *metrics-server
|
||||
installed: true
|
||||
namespace: kube-system
|
||||
createNamespace: false
|
||||
|
||||
helmfiles:
|
||||
- path: {{.Environment.Name }}/helmfile.yaml
|
40
releases.yaml
Normal file
40
releases.yaml
Normal 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
6
repositories.yaml
Normal 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
|
Reference in New Issue
Block a user