From 04206a9e35e6589e8138c837a49909563cc0a40c Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Tue, 23 Apr 2024 20:49:30 +0200 Subject: [PATCH] Work in progress --- charts/softplayer-backend/catalog.yaml | 0 .../templates/deployment.yaml | 5 +- charts/softplayer-backend/templates/vs.yaml | 2 + charts/softplayer-backend/values.yaml | 1 + charts/softplayer-web/values.yaml | 1 + common/helmfile.yaml | 59 ++++++++++ helmule/helmule.yaml | 111 ++++++++++++++++++ service/helmfile.yaml | 23 ++-- workload/helmfile.yaml | 62 +--------- workload/helmule/helmule.yaml | 38 +++++- workload/values/local-path.yaml | 3 + 11 files changed, 229 insertions(+), 76 deletions(-) create mode 100644 charts/softplayer-backend/catalog.yaml create mode 100644 common/helmfile.yaml create mode 100644 helmule/helmule.yaml create mode 100644 workload/values/local-path.yaml diff --git a/charts/softplayer-backend/catalog.yaml b/charts/softplayer-backend/catalog.yaml new file mode 100644 index 0000000..e69de29 diff --git a/charts/softplayer-backend/templates/deployment.yaml b/charts/softplayer-backend/templates/deployment.yaml index 4cd8189..2e73311 100644 --- a/charts/softplayer-backend/templates/deployment.yaml +++ b/charts/softplayer-backend/templates/deployment.yaml @@ -42,10 +42,7 @@ spec: imagePullPolicy: {{ .Values.image.pullPolicy }} args: - serve - - --reflection - - --smtp-host=badhouseplants.net - - --smtp-password='NCzs2fK8Gh5rAWxGte%!K54T7' - - --smtp-from=allanger@badhouseplants.net + - --reflection ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/charts/softplayer-backend/templates/vs.yaml b/charts/softplayer-backend/templates/vs.yaml index b036840..a3ae779 100644 --- a/charts/softplayer-backend/templates/vs.yaml +++ b/charts/softplayer-backend/templates/vs.yaml @@ -41,6 +41,8 @@ spec: - x-accept-response-streaming - x-user-agent - x-grpc-web + - token + - uuid maxAge: 1728s exposeHeaders: - grpc-status diff --git a/charts/softplayer-backend/values.yaml b/charts/softplayer-backend/values.yaml index ffee264..3079bb7 100644 --- a/charts/softplayer-backend/values.yaml +++ b/charts/softplayer-backend/values.yaml @@ -17,6 +17,7 @@ serviceAccount: deployAnnotations: keel.sh/policy: force + keel.sh/trigger: poll podLabels: {} podSecurityContext: diff --git a/charts/softplayer-web/values.yaml b/charts/softplayer-web/values.yaml index 778c563..0102b2a 100644 --- a/charts/softplayer-web/values.yaml +++ b/charts/softplayer-web/values.yaml @@ -17,6 +17,7 @@ serviceAccount: deployAnnotations: keel.sh/policy: force + keel.sh/trigger: poll podLabels: {} diff --git a/common/helmfile.yaml b/common/helmfile.yaml new file mode 100644 index 0000000..a3ca471 --- /dev/null +++ b/common/helmfile.yaml @@ -0,0 +1,59 @@ +repositories: + - name: zot + url: git.badhouseplants.net/softplayer/helm + oci: true + +releases: + - name: namespaces + namespace: kube-system + createNamespace: false + chart: ../charts/namespaces + values: + - ./values/namespaces.yaml + + - name: coredns + chart: zot/coredns + version: 1.29.0 + namespace: kube-system + values: + - ./values/coredns.yaml + + - name: cilium + chart: zot/cilium + installed: true + version: 1.15.4 + namespace: kube-system + needs: + - kube-system/coredns + values: + - ./values/cilium.yaml + + - name: metrics-server + chart: zot/metrics-server + version: 3.12.1 + namespace: kube-system + needs: + - kube-system/coredns + - kube-system/cilium + values: + - ./values/metrics-server.yaml + + - name: cert-manager + chart: zot/cert-manager + version: v1.14.4 + namespace: cert-manager + needs: + - kube-system/namespaces + - kube-system/coredns + values: + - ./values/cert-mangager.yaml + + - name: metallb + chart: metallb/metallb + version: 0.14.3 + namespace: metallb-system + createNamespace: false + needs: + - kube-system/namespaces + - kube-system/coredns + - kube-system/cilium diff --git a/helmule/helmule.yaml b/helmule/helmule.yaml new file mode 100644 index 0000000..c9ca27f --- /dev/null +++ b/helmule/helmule.yaml @@ -0,0 +1,111 @@ +repositories: + - name: cdf + helm: + url: https://cdfoundation.github.io/tekton-helm-chart/ + - name: istio + helm: + url: https://istio-release.storage.googleapis.com/charts + - name: metrics-server + helm: + url: https://kubernetes-sigs.github.io/metrics-server/ + - name: jetstack + helm: + url: https://charts.jetstack.io + - name: longhorn + helm: + url: https://charts.longhorn.io + - name: metallb + helm: + url: https://metallb.github.io/metallb + - name: coredns + helm: + url: https://coredns.github.io/helm + - name: cilium + helm: + url: https://helm.cilium.io/ + - name: traefik + helm: + url: https://traefik.github.io/charts + - name: flannel + helm: + url: https://flannel-io.github.io/flannel/ + - name: rancher-local-path + git: + url: https://github.com/rancher/local-path-provisioner.git + git_ref: main + path: deploy/chart + +mirrors: + - name: custom-commands + custom_command: + package: + - helm package -d package . + upload: + - helm push ./package/{{ name }}-{{ version }}.tgz oci://git.badhouseplants.net/softplayer/helm + - rm -rf ./package + +charts: + - name: coredns + repository: coredns + mirrors: + - custom_command + + - name: cilium + repository: cilium + mirrors: + - custom_command + + - name: metrics-server + repository: metrics-server + mirrors: + - custom_command + + - name: traefik + repository: traefik + mirrors: + - custom_command + + - name: cert-manager + repository: jetstack + mirrors: + - custom_command + + - name: metallb + repository: metallb + mirrors: + - custom_command + + - name: longhorn + repository: longhorn + mirrors: + - custom_command + + - name: flannel + repository: flannel + mirrors: + - custom_command + + - name: local-path-provisioner + repository: rancher-local-path + mirrors: + - custom_command + + - name: base + repository: istio + mirrors: + - custom_command + + - name: gateway + repository: istio + mirrors: + - custom_command + + - name: istiod + repository: istio + mirrors: + - custom_command + + - name: tekton-pipeline + repository: cdf + mirrors: + - custom_command diff --git a/service/helmfile.yaml b/service/helmfile.yaml index ddf95e8..cce36be 100644 --- a/service/helmfile.yaml +++ b/service/helmfile.yaml @@ -1,12 +1,6 @@ repositories: - - name: istio - url: https://istio-release.storage.googleapis.com/charts - - name: metallb - url: https://metallb.github.io/metallb - - name: cdf - url: https://cdfoundation.github.io/tekton-helm-chart/ - name: zot - url: registry.badhouseplants.net/helmule + url: git.badhouseplants.net/softplayer/helm oci: true releases: @@ -27,7 +21,7 @@ releases: - name: cilium chart: zot/cilium installed: true - version: 1.15.2 + version: 1.15.4 namespace: kube-system needs: - kube-system/coredns @@ -36,7 +30,7 @@ releases: - name: metrics-server chart: zot/metrics-server - version: 3.12.0 + version: 3.12.1 namespace: kube-system needs: - kube-system/coredns @@ -45,7 +39,7 @@ releases: - ./values/metrics-server.yaml - name: tekton - chart: cdf/tekton-pipeline + chart: zot/tekton-pipeline namespace: tekton-system version: 1.0.2 createNamespace: false @@ -95,7 +89,8 @@ releases: - kube-system/cilium - name: istio-base - chart: istio/base + chart: zot/base + version: 1.21.2 namespace: istio-system createNamespace: false needs: @@ -104,7 +99,8 @@ releases: - kube-system/cilium - name: istio-ingressgateway - chart: istio/gateway + version: 1.21.2 + chart: zot/gateway namespace: istio-system needs: - kube-system/namespaces @@ -115,7 +111,8 @@ releases: - ./values/values.istio-ingressgateway.yaml - name: istiod - chart: istio/istiod + chart: zot/istiod + version: 1.21.2 namespace: istio-system needs: - kube-system/namespaces diff --git a/workload/helmfile.yaml b/workload/helmfile.yaml index 3102fc8..a2f3779 100644 --- a/workload/helmfile.yaml +++ b/workload/helmfile.yaml @@ -1,6 +1,8 @@ +helmfiles: + - ../common/helmfile.yaml repositories: - name: zot - url: registry.badhouseplants.net/helmule + url: git.badhouseplants.net/softplayer/helm oci: true releases: @@ -10,74 +12,18 @@ releases: values: - ./values/namespaces.yaml - - name: coredns - chart: zot/coredns - version: 1.29.0 - namespace: kube-system - values: - - ./values/coredns.yaml - - - name: cilium - chart: zot/cilium - installed: true - version: 1.15.2 - namespace: kube-system - needs: - - kube-system/coredns - - kube-system/namespaces - values: - - ./values/cilium.yaml - - - name: metrics-server - chart: zot/metrics-server - version: 3.12.0 - namespace: kube-system - needs: - - kube-system/coredns - - kube-system/cilium - values: - - ./values/metrics-server.yaml - name: traefik chart: zot/traefik - version: 26.1.0 + version: 27.0.2 needs: - kube-system/namespaces - kube-system/coredns - kube-system/cilium namespace: traefik-system - - name: cert-manager - chart: zot/cert-manager - version: v1.14.4 - namespace: cert-manager - needs: - - kube-system/namespaces - - kube-system/coredns - values: - - ./values/cert-mangager.yaml - - - name: metallb - chart: zot/metallb - version: 0.14.3 - namespace: metallb-system - needs: - - kube-system/namespaces - - kube-system/coredns - - kube-system/cilium - name: local-path-provisioner chart: zot/local-path-provisioner version: 0.0.25-dev - - name: longhorn - chart: zot/longhorn - namespace: longhorn-system - installed: false - version: 1.6.0 - values: - - ./values/longhorn.yaml - needs: - - kube-system/namespaces - - kube-system/coredns - - kube-system/cilium diff --git a/workload/helmule/helmule.yaml b/workload/helmule/helmule.yaml index ce21e5b..c9ca27f 100644 --- a/workload/helmule/helmule.yaml +++ b/workload/helmule/helmule.yaml @@ -1,4 +1,10 @@ repositories: + - name: cdf + helm: + url: https://cdfoundation.github.io/tekton-helm-chart/ + - name: istio + helm: + url: https://istio-release.storage.googleapis.com/charts - name: metrics-server helm: url: https://kubernetes-sigs.github.io/metrics-server/ @@ -28,48 +34,78 @@ repositories: url: https://github.com/rancher/local-path-provisioner.git git_ref: main path: deploy/chart + mirrors: - name: custom-commands custom_command: package: - helm package -d package . upload: - - helm push ./package/{{ name }}-{{ version }}.tgz oci://registry.badhouseplants.net/helmule + - helm push ./package/{{ name }}-{{ version }}.tgz oci://git.badhouseplants.net/softplayer/helm - rm -rf ./package + charts: - name: coredns repository: coredns mirrors: - custom_command + - name: cilium repository: cilium mirrors: - custom_command + - name: metrics-server repository: metrics-server mirrors: - custom_command + - name: traefik repository: traefik mirrors: - custom_command + - name: cert-manager repository: jetstack mirrors: - custom_command + - name: metallb repository: metallb mirrors: - custom_command + - name: longhorn repository: longhorn mirrors: - custom_command + - name: flannel repository: flannel mirrors: - custom_command + - name: local-path-provisioner repository: rancher-local-path mirrors: - custom_command + + - name: base + repository: istio + mirrors: + - custom_command + + - name: gateway + repository: istio + mirrors: + - custom_command + + - name: istiod + repository: istio + mirrors: + - custom_command + + - name: tekton-pipeline + repository: cdf + mirrors: + - custom_command diff --git a/workload/values/local-path.yaml b/workload/values/local-path.yaml new file mode 100644 index 0000000..511dd9a --- /dev/null +++ b/workload/values/local-path.yaml @@ -0,0 +1,3 @@ +storageClass: + create: true + defaultClass: true