Fix empty CRDs, only deploy eck-operator if needed
This commit is contained in:
parent
835aae9df8
commit
5909fcd841
@ -2,7 +2,7 @@
|
|||||||
# fullnameOverride: ""
|
# fullnameOverride: ""
|
||||||
|
|
||||||
eck-operator:
|
eck-operator:
|
||||||
enabled: true
|
enabled: false
|
||||||
installCRDs: false
|
installCRDs: false
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: node-role.kubernetes.io/master
|
- key: node-role.kubernetes.io/master
|
||||||
|
@ -71,10 +71,10 @@ function delete_ns() {
|
|||||||
|
|
||||||
# Extract crds via helm calls and apply delta=crds only
|
# Extract crds via helm calls and apply delta=crds only
|
||||||
function _crds() {
|
function _crds() {
|
||||||
helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds --set ${release}.installCRDs=false > $TMPDIR/helm-no-crds.yaml
|
helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds --set ${release}.installCRDs=false > $TMPDIR/helm-no-crds.yaml
|
||||||
helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds --set ${release}.installCRDs=true > $TMPDIR/helm-crds.yaml
|
helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds --set ${release}.installCRDs=true > $TMPDIR/helm-crds.yaml
|
||||||
diff -e $TMPDIR/helm-no-crds.yaml $TMPDIR/helm-crds.yaml | head -n-1 | tail -n+2 > $TMPDIR/crds.yaml
|
diff -e $TMPDIR/helm-no-crds.yaml $TMPDIR/helm-crds.yaml | head -n-1 | tail -n+2 > $TMPDIR/crds.yaml
|
||||||
kubectl apply -f $TMPDIR/crds.yaml
|
[ -s $TMPDIR/crds.yaml ] && kubectl apply -f $TMPDIR/crds.yaml
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ function logging-crds() {
|
|||||||
helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds --set eck-operator.installCRDs=false > $TMPDIR/helm-no-crds.yaml
|
helm template $(chart_location $chart) --namespace $namespace --name-template $release --skip-crds --set eck-operator.installCRDs=false > $TMPDIR/helm-no-crds.yaml
|
||||||
helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds --set eck-operator.installCRDs=true > $TMPDIR/helm-crds.yaml
|
helm template $(chart_location $chart) --namespace $namespace --name-template $release --include-crds --set eck-operator.installCRDs=true > $TMPDIR/helm-crds.yaml
|
||||||
diff -e $TMPDIR/helm-no-crds.yaml $TMPDIR/helm-crds.yaml | head -n-1 | tail -n+2 > $TMPDIR/crds.yaml
|
diff -e $TMPDIR/helm-no-crds.yaml $TMPDIR/helm-crds.yaml | head -n-1 | tail -n+2 > $TMPDIR/crds.yaml
|
||||||
kubectl apply -f $TMPDIR/crds.yaml
|
[ -s $TMPDIR/crds.yaml ] && kubectl apply -f $TMPDIR/crds.yaml
|
||||||
}
|
}
|
||||||
function logging-post() {
|
function logging-post() {
|
||||||
kubectl annotate --overwrite namespace logging 'iam.amazonaws.com/permitted=.*ElasticSearchSnapshots.*'
|
kubectl annotate --overwrite namespace logging 'iam.amazonaws.com/permitted=.*ElasticSearchSnapshots.*'
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
{{- define "logging-values" }}
|
{{- define "logging-values" }}
|
||||||
|
{{- if or .Values.logging.es .Values.logging.kibana }}
|
||||||
{{- with index .Values "logging" "eck-operator" }}
|
|
||||||
eck-operator:
|
eck-operator:
|
||||||
|
enabled: true
|
||||||
|
{{- with index .Values "logging" "eck-operator" }}
|
||||||
{{- toYaml . | nindent 2 }}
|
{{- toYaml . | nindent 2 }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- if .Values.logging.elastic_password }}
|
{{- if .Values.logging.elastic_password }}
|
||||||
|
Loading…
Reference in New Issue
Block a user