From 6ed08d973920e232834065fa18cdc9dd4a9bf225 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Thu, 25 Jun 2020 13:52:07 +0100 Subject: [PATCH] New cleaned up KubeZero layout --- .helmdocsignore | 2 + charts/kubezero-app/README.md | 27 ------- charts/kubezero-app/values.yaml | 29 -------- .../Chart.yaml | 11 ++- charts/kubezero-argo-cd/README.md | 42 +++++++++++ .../templates/app.yaml | 12 +-- .../templates/istio-service.yaml | 4 +- .../templates/project.yaml | 0 charts/kubezero-argo-cd/values.yaml | 73 +++++++++++++++++++ charts/{kubezero-app => kubezero}/.helmignore | 0 charts/kubezero/Chart.yaml | 9 +-- charts/kubezero/README.md | 30 ++------ .../templates/_app.yaml | 0 .../templates/aws-ebs-csi-driver.yaml | 0 .../templates/calico.yaml | 0 .../templates/cert-manager.yaml | 0 .../templates/kiam.yaml | 0 .../templates/local-volume-provisioner.yaml | 0 .../values-all.yaml | 0 charts/kubezero/values.yaml | 67 +++-------------- 20 files changed, 151 insertions(+), 155 deletions(-) delete mode 100644 charts/kubezero-app/README.md delete mode 100644 charts/kubezero-app/values.yaml rename charts/{kubezero-app => kubezero-argo-cd}/Chart.yaml (57%) create mode 100644 charts/kubezero-argo-cd/README.md rename charts/{kubezero => kubezero-argo-cd}/templates/app.yaml (51%) rename charts/{kubezero => kubezero-argo-cd}/templates/istio-service.yaml (85%) rename charts/{kubezero => kubezero-argo-cd}/templates/project.yaml (100%) create mode 100644 charts/kubezero-argo-cd/values.yaml rename charts/{kubezero-app => kubezero}/.helmignore (100%) rename charts/{kubezero-app => kubezero}/templates/_app.yaml (100%) rename charts/{kubezero-app => kubezero}/templates/aws-ebs-csi-driver.yaml (100%) rename charts/{kubezero-app => kubezero}/templates/calico.yaml (100%) rename charts/{kubezero-app => kubezero}/templates/cert-manager.yaml (100%) rename charts/{kubezero-app => kubezero}/templates/kiam.yaml (100%) rename charts/{kubezero-app => kubezero}/templates/local-volume-provisioner.yaml (100%) rename charts/{kubezero-app => kubezero}/values-all.yaml (100%) diff --git a/.helmdocsignore b/.helmdocsignore index 3a318aec..8fc08f21 100644 --- a/.helmdocsignore +++ b/.helmdocsignore @@ -1,2 +1,4 @@ # Ignore sub-charts charts/*/charts/* +charts/kubezero-lib +deploy diff --git a/charts/kubezero-app/README.md b/charts/kubezero-app/README.md deleted file mode 100644 index 836c8f50..00000000 --- a/charts/kubezero-app/README.md +++ /dev/null @@ -1,27 +0,0 @@ -kubezero-app -============ -KubeZero ArgoCD Application - Root chart of the KubeZero - -Current chart version is `0.2.4` - -Source code can be found [here](https://kubezero.com) - -## Chart Requirements - -| Repository | Name | Version | -|------------|------|---------| -| https://zero-down-time.github.io/kubezero/ | kubezero-lib | >= 0.1.1 | - -## Chart Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| aws-ebs-csi-driver.enabled | bool | `false` | | -| calico.enabled | bool | `false` | | -| cert-manager.enabled | bool | `false` | | -| global.defaultDestination.server | string | `"https://kubernetes.default.svc"` | | -| global.defaultSource.pathPrefix | string | `""` | | -| global.defaultSource.repoURL | string | `"https://github.com/zero-down-time/kubezero"` | | -| global.defaultSource.targetRevision | string | `"HEAD"` | | -| kiam.enabled | bool | `false` | | -| local-volume-provisioner.enabled | bool | `false` | | diff --git a/charts/kubezero-app/values.yaml b/charts/kubezero-app/values.yaml deleted file mode 100644 index c888333a..00000000 --- a/charts/kubezero-app/values.yaml +++ /dev/null @@ -1,29 +0,0 @@ -global: - defaultDestination: - server: https://kubernetes.default.svc - - # This repoURL is used a base for all the repoURLs applications - # Setting this to a eg. private git repo incl. the use of pathPrefix allows kubezero to be - # integrated into any repository as a git subtree if for example public internet access is unavailable - defaultSource: - # defaultSource.repoURL -- default repository for argocd applications - repoURL: https://github.com/zero-down-time/kubezero - # defaultSource.targetRevision -- default tracking of repoURL - targetRevision: HEAD - # defaultSource.pathPrefix -- optional path prefix within repoURL to support eg. remote subtrees - pathPrefix: '' - -calico: - enabled: false - -local-volume-provisioner: - enabled: false - -cert-manager: - enabled: false - -kiam: - enabled: false - -aws-ebs-csi-driver: - enabled: false diff --git a/charts/kubezero-app/Chart.yaml b/charts/kubezero-argo-cd/Chart.yaml similarity index 57% rename from charts/kubezero-app/Chart.yaml rename to charts/kubezero-argo-cd/Chart.yaml index 2522dde8..758803f4 100644 --- a/charts/kubezero-app/Chart.yaml +++ b/charts/kubezero-argo-cd/Chart.yaml @@ -1,8 +1,7 @@ apiVersion: v2 -name: kubezero-app -description: KubeZero ArgoCD Application - Root chart of the KubeZero -type: application -version: 0.2.4 +description: KubeZero ArgoCD Helm chart to install ArgoCD itself and the KubeZero ArgoCD Application +name: kubezero-argo-cd +version: 0.3.0 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: @@ -11,8 +10,12 @@ keywords: - gitops maintainers: - name: Quarky9 +dependencies: dependencies: - name: kubezero-lib version: ">= 0.1.1" repository: https://zero-down-time.github.io/kubezero/ + - name: argo-cd + version: 2.3.2 + repository: https://argoproj.github.io/argo-helm kubeVersion: ">= 1.16.0" diff --git a/charts/kubezero-argo-cd/README.md b/charts/kubezero-argo-cd/README.md new file mode 100644 index 00000000..fb994242 --- /dev/null +++ b/charts/kubezero-argo-cd/README.md @@ -0,0 +1,42 @@ +kubezero-argo-cd +================ +KubeZero ArgoCD Helm chart to install ArgoCD itself and the KubeZero ArgoCD Application + +Current chart version is `0.3.0` + +Source code can be found [here](https://kubezero.com) + +## Chart Requirements + +| Repository | Name | Version | +|------------|------|---------| +| https://argoproj.github.io/argo-helm | argo-cd | 2.3.2 | +| https://zero-down-time.github.io/kubezero/ | kubezero-lib | >= 0.1.1 | + +## Chart Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| argo-cd.controller.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | +| argo-cd.controller.tolerations[0].effect | string | `"NoSchedule"` | | +| argo-cd.controller.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | +| argo-cd.dex.enabled | bool | `false` | | +| argo-cd.installCRDs | bool | `false` | | +| argo-cd.istio.enabled | bool | `false` | Deploy Istio VirtualService to expose ArgoCD | +| argo-cd.istio.gateway | string | `"ingressgateway.istio-system.svc.cluster.local"` | Name of the Istio gateway to add the VirtualService to | +| argo-cd.redis.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | +| argo-cd.redis.tolerations[0].effect | string | `"NoSchedule"` | | +| argo-cd.redis.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | +| argo-cd.repoServer.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | +| argo-cd.repoServer.tolerations[0].effect | string | `"NoSchedule"` | | +| argo-cd.repoServer.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | +| argo-cd.server.config.url | string | `"argocd.example.com"` | ArgoCD hostname to be exposed via Istio | +| argo-cd.server.extraArgs[0] | string | `"--insecure"` | | +| argo-cd.server.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | +| argo-cd.server.service.servicePortHttpsName | string | `"grpc"` | | +| argo-cd.server.tolerations[0].effect | string | `"NoSchedule"` | | +| argo-cd.server.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | +| kubezero.global.defaultDestination | object | `{"server":"https://kubernetes.default.svc"}` | Destination cluster | +| kubezero.global.defaultSource.pathPrefix | string | `""` | optional path prefix within repoURL to support eg. remote subtrees | +| kubezero.global.defaultSource.repoURL | string | `"https://github.com/zero-down-time/kubezero"` | default repository for argocd applications | +| kubezero.global.defaultSource.targetRevision | string | `"HEAD"` | default tracking of repoURL | diff --git a/charts/kubezero/templates/app.yaml b/charts/kubezero-argo-cd/templates/app.yaml similarity index 51% rename from charts/kubezero/templates/app.yaml rename to charts/kubezero-argo-cd/templates/app.yaml index 24b4a83a..f9979883 100644 --- a/charts/kubezero/templates/app.yaml +++ b/charts/kubezero-argo-cd/templates/app.yaml @@ -8,20 +8,16 @@ metadata: spec: project: kubezero source: - repoURL: {{ .Values.global.defaultSource.repoURL }} - targetRevision: {{ .Values.global.defaultSource.targetRevision }} - path: {{ .Values.global.defaultSource.pathPrefix}}charts/kubezero-app + repoURL: {{ .Values.kubezero.global.defaultSource.repoURL }} + targetRevision: {{ .Values.kubezero.global.defaultSource.targetRevision }} + path: {{ .Values.kubezero.global.defaultSource.pathPrefix}}charts/kubezero helm: values: | - global: -{{- toYaml .Values.global | nindent 10 }} -{{- if .Values.kubezero }} {{- toYaml .Values.kubezero | nindent 8 }} -{{- end }} destination: - server: {{ .Values.global.defaultDestination.server }} + server: {{ .Values.kubezero.global.defaultDestination.server }} namespace: argocd syncPolicy: automated: diff --git a/charts/kubezero/templates/istio-service.yaml b/charts/kubezero-argo-cd/templates/istio-service.yaml similarity index 85% rename from charts/kubezero/templates/istio-service.yaml rename to charts/kubezero-argo-cd/templates/istio-service.yaml index 195494ce..03d889cb 100644 --- a/charts/kubezero/templates/istio-service.yaml +++ b/charts/kubezero-argo-cd/templates/istio-service.yaml @@ -1,4 +1,4 @@ -{{- if .Values.istio.enabled }} +{{- if index .Values "argo-cd" "istio" "enabled" }} apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: @@ -7,7 +7,7 @@ metadata: {{ include "kubezero-lib.labels" . | indent 4 }} spec: gateways: - - {{ .Values.istio.gateway }} + - {{ index .Values "argo-cd" "istio" "gateway" }} hosts: - {{ index .Values "argo-cd" "server" "config" "url" }} http: diff --git a/charts/kubezero/templates/project.yaml b/charts/kubezero-argo-cd/templates/project.yaml similarity index 100% rename from charts/kubezero/templates/project.yaml rename to charts/kubezero-argo-cd/templates/project.yaml diff --git a/charts/kubezero-argo-cd/values.yaml b/charts/kubezero-argo-cd/values.yaml new file mode 100644 index 00000000..39e382be --- /dev/null +++ b/charts/kubezero-argo-cd/values.yaml @@ -0,0 +1,73 @@ +kubezero: + global: + # kubezero.global.defaultDestination -- Destination cluster + defaultDestination: + server: https://kubernetes.default.svc + + # This repoURL is used a base for all the repoURLs applications + # Setting this to a eg. private git repo incl. the use of pathPrefix allows kubezero to be + # integrated into any repository as a git subtree if for example public internet access is unavailable + defaultSource: + # kubezero.global.defaultSource.repoURL -- default repository for argocd applications + repoURL: https://github.com/zero-down-time/kubezero + # kubezero.global.defaultSource.targetRevision -- default tracking of repoURL + targetRevision: HEAD + # kubezero.global.defaultSource.pathPrefix -- optional path prefix within repoURL to support eg. remote subtrees + pathPrefix: '' + +argo-cd: + installCRDs: false + + #configs: + # secret: + # `htpasswd -nbBC 10 "" $ARGO_PWD | tr -d ':\n' | sed 's/$2y/$2a/'` + # argocdServerAdminPassword: "$2a$10$ivKzaXVxMqdeDSfS3nqi1Od3iDbnL7oXrixzDfZFRHlXHnAG6LydG" + # argocdServerAdminPasswordMtime: "2020-04-24T15:33:09BST" + + # Run Argo on the controllers + controller: + nodeSelector: + node-role.kubernetes.io/master: "" + tolerations: + - key: node-role.kubernetes.io/master + effect: NoSchedule + + repoServer: + nodeSelector: + node-role.kubernetes.io/master: "" + tolerations: + - key: node-role.kubernetes.io/master + effect: NoSchedule + + server: + config: + # argo-cd.server.config.url -- ArgoCD hostname to be exposed via Istio + url: argocd.example.com + + # Rename former https port to grpc, works with istio + insecure + service: + servicePortHttpsName: grpc + + extraArgs: + - --insecure + nodeSelector: + node-role.kubernetes.io/master: "" + tolerations: + - key: node-role.kubernetes.io/master + effect: NoSchedule + + redis: + nodeSelector: + node-role.kubernetes.io/master: "" + tolerations: + - key: node-role.kubernetes.io/master + effect: NoSchedule + + dex: + enabled: false + + istio: + # argo-cd.istio.enabled -- Deploy Istio VirtualService to expose ArgoCD + enabled: false + # argo-cd.istio.gateway -- Name of the Istio gateway to add the VirtualService to + gateway: ingressgateway.istio-system.svc.cluster.local diff --git a/charts/kubezero-app/.helmignore b/charts/kubezero/.helmignore similarity index 100% rename from charts/kubezero-app/.helmignore rename to charts/kubezero/.helmignore diff --git a/charts/kubezero/Chart.yaml b/charts/kubezero/Chart.yaml index d6052fe5..2d141a46 100644 --- a/charts/kubezero/Chart.yaml +++ b/charts/kubezero/Chart.yaml @@ -1,7 +1,8 @@ apiVersion: v2 -description: KubeZero Helm chart to install Zero Down Time Kuberenetes platform name: kubezero -version: 0.2.6 +description: KubeZero ArgoCD Application - Root App of Apps chart of KubeZero +type: application +version: 0.3.0 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: @@ -10,12 +11,8 @@ keywords: - gitops maintainers: - name: Quarky9 -dependencies: dependencies: - name: kubezero-lib version: ">= 0.1.1" repository: https://zero-down-time.github.io/kubezero/ - - name: argo-cd - version: 2.3.2 - repository: https://argoproj.github.io/argo-helm kubeVersion: ">= 1.16.0" diff --git a/charts/kubezero/README.md b/charts/kubezero/README.md index 0de00b91..50d0a048 100644 --- a/charts/kubezero/README.md +++ b/charts/kubezero/README.md @@ -1,8 +1,8 @@ kubezero ======== -KubeZero Helm chart to install Zero Down Time Kuberenetes platform +KubeZero ArgoCD Application - Root App of Apps chart of KubeZero -Current chart version is `0.2.6` +Current chart version is `0.3.0` Source code can be found [here](https://kubezero.com) @@ -10,34 +10,18 @@ Source code can be found [here](https://kubezero.com) | Repository | Name | Version | |------------|------|---------| -| https://argoproj.github.io/argo-helm | argo-cd | 2.3.2 | | https://zero-down-time.github.io/kubezero/ | kubezero-lib | >= 0.1.1 | ## Chart Values | Key | Type | Default | Description | |-----|------|---------|-------------| -| argo-cd.controller.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | -| argo-cd.controller.tolerations[0].effect | string | `"NoSchedule"` | | -| argo-cd.controller.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | -| argo-cd.dex.enabled | bool | `false` | | -| argo-cd.installCRDs | bool | `false` | | -| argo-cd.redis.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | -| argo-cd.redis.tolerations[0].effect | string | `"NoSchedule"` | | -| argo-cd.redis.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | -| argo-cd.repoServer.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | -| argo-cd.repoServer.tolerations[0].effect | string | `"NoSchedule"` | | -| argo-cd.repoServer.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | -| argo-cd.server.config.url | string | `"argocd.example.com"` | ArgoCD hostname to be exposed via Istio | -| argo-cd.server.extraArgs[0] | string | `"--insecure"` | | -| argo-cd.server.nodeSelector."node-role.kubernetes.io/master" | string | `""` | | -| argo-cd.server.service.servicePortHttpsName | string | `"grpc"` | | -| argo-cd.server.tolerations[0].effect | string | `"NoSchedule"` | | -| argo-cd.server.tolerations[0].key | string | `"node-role.kubernetes.io/master"` | | +| aws-ebs-csi-driver.enabled | bool | `false` | | +| calico.enabled | bool | `false` | | +| cert-manager.enabled | bool | `false` | | | global.defaultDestination.server | string | `"https://kubernetes.default.svc"` | | | global.defaultSource.pathPrefix | string | `""` | | | global.defaultSource.repoURL | string | `"https://github.com/zero-down-time/kubezero"` | | | global.defaultSource.targetRevision | string | `"HEAD"` | | -| istio.enabled | bool | `false` | Deploy Istio VirtualService to expose ArgoCD | -| istio.gateway | string | `"ingressgateway.istio-system.svc.cluster.local"` | Name of the Istio gateway to add the VirtualService to | -| kubezero | object | `{}` | Kubezero configuration, values.yaml please see kubezeroApp | +| kiam.enabled | bool | `false` | | +| local-volume-provisioner.enabled | bool | `false` | | diff --git a/charts/kubezero-app/templates/_app.yaml b/charts/kubezero/templates/_app.yaml similarity index 100% rename from charts/kubezero-app/templates/_app.yaml rename to charts/kubezero/templates/_app.yaml diff --git a/charts/kubezero-app/templates/aws-ebs-csi-driver.yaml b/charts/kubezero/templates/aws-ebs-csi-driver.yaml similarity index 100% rename from charts/kubezero-app/templates/aws-ebs-csi-driver.yaml rename to charts/kubezero/templates/aws-ebs-csi-driver.yaml diff --git a/charts/kubezero-app/templates/calico.yaml b/charts/kubezero/templates/calico.yaml similarity index 100% rename from charts/kubezero-app/templates/calico.yaml rename to charts/kubezero/templates/calico.yaml diff --git a/charts/kubezero-app/templates/cert-manager.yaml b/charts/kubezero/templates/cert-manager.yaml similarity index 100% rename from charts/kubezero-app/templates/cert-manager.yaml rename to charts/kubezero/templates/cert-manager.yaml diff --git a/charts/kubezero-app/templates/kiam.yaml b/charts/kubezero/templates/kiam.yaml similarity index 100% rename from charts/kubezero-app/templates/kiam.yaml rename to charts/kubezero/templates/kiam.yaml diff --git a/charts/kubezero-app/templates/local-volume-provisioner.yaml b/charts/kubezero/templates/local-volume-provisioner.yaml similarity index 100% rename from charts/kubezero-app/templates/local-volume-provisioner.yaml rename to charts/kubezero/templates/local-volume-provisioner.yaml diff --git a/charts/kubezero-app/values-all.yaml b/charts/kubezero/values-all.yaml similarity index 100% rename from charts/kubezero-app/values-all.yaml rename to charts/kubezero/values-all.yaml diff --git a/charts/kubezero/values.yaml b/charts/kubezero/values.yaml index ad26707b..0682f2bd 100644 --- a/charts/kubezero/values.yaml +++ b/charts/kubezero/values.yaml @@ -13,62 +13,17 @@ global: # defaultSource.pathPrefix -- optional path prefix within repoURL to support eg. remote subtrees pathPrefix: '' -# kubezero -- Kubezero configuration, values.yaml please see kubezeroApp -kubezero: {} +calico: + enabled: true -argo-cd: - installCRDs: false +cert-manager: + enabled: true - #configs: - # secret: - # `htpasswd -nbBC 10 "" $ARGO_PWD | tr -d ':\n' | sed 's/$2y/$2a/'` - # argocdServerAdminPassword: "$2a$10$ivKzaXVxMqdeDSfS3nqi1Od3iDbnL7oXrixzDfZFRHlXHnAG6LydG" - # argocdServerAdminPasswordMtime: "2020-04-24T15:33:09BST" - - # Run Argo on the controllers - controller: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - key: node-role.kubernetes.io/master - effect: NoSchedule - - repoServer: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - key: node-role.kubernetes.io/master - effect: NoSchedule - - server: - config: - # argo-cd.server.config.url -- ArgoCD hostname to be exposed via Istio - url: argocd.example.com - - # Rename former https port to grpc, works with istio + insecure - service: - servicePortHttpsName: grpc - - extraArgs: - - --insecure - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - key: node-role.kubernetes.io/master - effect: NoSchedule - - redis: - nodeSelector: - node-role.kubernetes.io/master: "" - tolerations: - - key: node-role.kubernetes.io/master - effect: NoSchedule - - dex: - enabled: false - -istio: - # istio.enabled -- Deploy Istio VirtualService to expose ArgoCD +local-volume-provisioner: + enabled: false + +kiam: + enabled: false + +aws-ebs-csi-driver: enabled: false - # istio.gateway -- Name of the Istio gateway to add the VirtualService to - gateway: ingressgateway.istio-system.svc.cluster.local