first commit
This commit is contained in:
parent
5389830dd0
commit
e60f35a6ae
25
.drone.yml
Normal file
25
.drone.yml
Normal 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
|
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
|
||||
#
|
||||
#
|
||||
#
|
20
helmfile.yaml
Normal file
20
helmfile.yaml
Normal 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
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