From 2b5103c6eeafd88b49c8ee6102c7c50e0902e778 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Wed, 29 Jul 2020 14:46:55 +0100 Subject: [PATCH] Calico cleanup, add efs-csi --- charts/kubezero-calico/test-pod.yaml | 34 +++++++++++++++++++++++++++ charts/kubezero/Chart.yaml | 4 ++-- charts/kubezero/README.md | 4 +--- charts/kubezero/templates/calico.yaml | 4 +--- charts/kubezero/values.yaml | 3 --- deploy/templates/values.yaml | 28 +++++++++++++--------- deploy/values.yaml | 10 +++++--- 7 files changed, 62 insertions(+), 25 deletions(-) create mode 100644 charts/kubezero-calico/test-pod.yaml diff --git a/charts/kubezero-calico/test-pod.yaml b/charts/kubezero-calico/test-pod.yaml new file mode 100644 index 00000000..e3c4f357 --- /dev/null +++ b/charts/kubezero-calico/test-pod.yaml @@ -0,0 +1,34 @@ +# Once pod is running: +# kubectl -n NAME-SPACE-TO-TEST exec -it pod/POD_NAME /bin/sh + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: netshoot + namespace: kube-system + labels: + app: netshoot +spec: + replicas: 2 + strategy: + type: Recreate + selector: + matchLabels: + app: netshoot + template: + metadata: + labels: + app: netshoot + spec: + containers: + - name: netshoot + image: nicolaka/netshoot + imagePullPolicy: Always + command: + - /bin/sleep + args: + - "3600" + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: "kubernetes.io/hostname" diff --git a/charts/kubezero/Chart.yaml b/charts/kubezero/Chart.yaml index 262a6c2b..7d00c53f 100644 --- a/charts/kubezero/Chart.yaml +++ b/charts/kubezero/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: kubezero description: KubeZero ArgoCD Application - Root App of Apps chart of KubeZero type: application -version: 0.3.10 +version: 0.3.11 home: https://kubezero.com icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png keywords: @@ -15,4 +15,4 @@ dependencies: - name: kubezero-lib version: ">= 0.1.1" repository: https://zero-down-time.github.io/kubezero/ -kubeVersion: ">= 1.16.0" +kubeVersion: ">= 1.16.12" diff --git a/charts/kubezero/README.md b/charts/kubezero/README.md index bb93bece..7fe23c66 100644 --- a/charts/kubezero/README.md +++ b/charts/kubezero/README.md @@ -2,7 +2,7 @@ kubezero ======== KubeZero ArgoCD Application - Root App of Apps chart of KubeZero -Current chart version is `0.3.10` +Current chart version is `0.3.11` Source code can be found [here](https://kubezero.com) @@ -19,8 +19,6 @@ Source code can be found [here](https://kubezero.com) | aws-ebs-csi-driver.enabled | bool | `false` | | | aws-efs-csi-driver.enabled | bool | `false` | | | calico.enabled | bool | `true` | | -| calico.type | string | `"kustomize"` | | -| calico.values.migration | bool | `false` | | | cert-manager.enabled | bool | `true` | | | global.defaultDestination.server | string | `"https://kubernetes.default.svc"` | | | global.defaultSource.pathPrefix | string | `""` | | diff --git a/charts/kubezero/templates/calico.yaml b/charts/kubezero/templates/calico.yaml index a56ad5e3..91eebd56 100644 --- a/charts/kubezero/templates/calico.yaml +++ b/charts/kubezero/templates/calico.yaml @@ -1,10 +1,8 @@ {{- if .Values.calico.enabled }} -{{ template "kubezero-app.app" dict "root" . "name" "calico" "type" .Values.calico.type "retain" true }} - {{- if not .Values.calico.values.migration }} +{{ template "kubezero-app.app" dict "root" . "name" "calico" "type" "helm" "retain" true }} syncPolicy: automated: prune: true - {{- end }} ignoreDifferences: - group: apiextensions.k8s.io diff --git a/charts/kubezero/values.yaml b/charts/kubezero/values.yaml index 5fdbdacc..dba77824 100644 --- a/charts/kubezero/values.yaml +++ b/charts/kubezero/values.yaml @@ -17,9 +17,6 @@ platform: aws calico: enabled: true - type: kustomize - values: - migration: false cert-manager: enabled: true diff --git a/deploy/templates/values.yaml b/deploy/templates/values.yaml index 48cfca23..8d00320a 100644 --- a/deploy/templates/values.yaml +++ b/deploy/templates/values.yaml @@ -7,11 +7,9 @@ kubezero: enabled: {{ .Values.calico.enabled }} type: {{ default "kustomize" .Values.calico.type }} values: - migration: {{ default false .Values.calico.migration }} - prometheus: false - # prometheus: {{ .Values.prometheus.enabled }} network: {{ default "vxlan" .Values.calico.network }} mtu: {{ default "8941" .Values.calico.mtu }} + prometheus: {{ .Values.prometheus.enabled }} cert-manager: enabled: {{ index .Values "cert-manager" "enabled" }} {{- if not .Values.bootstrap }} @@ -52,6 +50,7 @@ kubezero: iam.amazonaws.com/role: "{{ index .Values "aws-ebs-csi-driver" "IamArn" }}" extraVolumeTags: Name: {{ .Values.ClusterName }} + kiam: enabled: {{ .Values.kiam.enabled }} values: @@ -63,6 +62,17 @@ kubezero: prometheus: servicemonitor: enabled: {{ .Values.prometheus.enabled }} + + aws-efs-csi-driver: + enabled: {{ index .Values "aws-efs-csi-driver" "enabled" }} + values: + aws-efs-csi-driver: + nodeSelector: + node.kubernetes.io/csi.efs.fs: {{ index .Values "aws-efs-csi-driver" "EfsId" }} + PersistentVolume: + create: true + EfsId: {{ index .Values "aws-efs-csi-driver" "EfsId" }} + Name: {{ default "kubezero-efs-pv" ( index .Values "aws-efs-csi-driver" "PVName" ) }} {{- end }} istio: @@ -70,14 +80,10 @@ kubezero: values: istiod: replicaCount: {{ ternary 2 1 .Values.HighAvailableControlplane }} + {{- if .Values.istio.ingress }} ingress: - private: {{ .Values.istio.ingress.private }} - type: {{ .Values.istio.ingress.type }} - replicaCount: {{ default 2 .Values.istio.ingress.replicaCount }} - dnsNames: - {{- with .Values.istio.ingress.dnsNames }} - {{- . | toYaml | nindent 8 }} - {{- end }} + {{- toYaml .Values.istio.ingress | nindent 8 }} + {{- end }} {{- end }} @@ -90,7 +96,7 @@ argo-cd: configs: {{- toYaml . | nindent 4 }} {{- end }} - {{- if and ( not .Values.bootstrap ) .Values.istio.enabled }} + {{- if and ( not .Values.bootstrap ) ( index .Values "argo-cd" "istio" ) }} istio: {{- with index .Values "argo-cd" "istio" }} {{- toYaml . | nindent 4 }} diff --git a/deploy/values.yaml b/deploy/values.yaml index dceb6f71..0c00f1fd 100644 --- a/deploy/values.yaml +++ b/deploy/values.yaml @@ -1,12 +1,11 @@ ClusterName: Test-cluster Domain: example.com -aws: true +platform: aws HighAvailableControlplane: false calico: enabled: true - migration: false cert-manager: enabled: true @@ -16,6 +15,9 @@ aws-ebs-csi-driver: enabled: true IamArn: "" +aws-efs-csi-driver: + enabled: false + kiam: enabled: true IamArn: "" @@ -28,4 +30,6 @@ prometheus: argo-cd: server: {} - gateway: private-ingressgateway.istio-system.svc.cluster.local + istio: + enabled: true + gateway: private-ingressgateway.istio-system.svc.cluster.local