diff --git a/chart/templates/istio/controlplane/istio-controlplane-helmrelease.yaml b/chart/templates/istio/controlplane/istio-controlplane-helmrelease.yaml index 9c28d6af50f81be0f253c9f157083da082341aa8..b2ae33aa15e30b62442710c42735fa848fa2488c 100644 --- a/chart/templates/istio/controlplane/istio-controlplane-helmrelease.yaml +++ b/chart/templates/istio/controlplane/istio-controlplane-helmrelease.yaml @@ -47,6 +47,7 @@ spec: imagePullSecrets: - private-registry + openshift: {{ .Values.openshift }} {{- if .Values.istio.sso.enabled }} ingress: diff --git a/chart/templates/istio/controlplane/namespace.yaml b/chart/templates/istio/controlplane/namespace.yaml index 451102e7ed75a3f3a6f924882ad6018163d1a6bf..fc17057228e53a6cc465997fb2512212bfb8c408 100644 --- a/chart/templates/istio/controlplane/namespace.yaml +++ b/chart/templates/istio/controlplane/namespace.yaml @@ -21,6 +21,17 @@ metadata: type: kubernetes.io/dockerconfigjson data: .dockerconfigjson: {{ template "imagePullSecret" . }} +{{- if .Values.openshift }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: private-registry + namespace: kube-system +type: kubernetes.io/dockerconfigjson +data: + .dockerconfigjson: {{ template "imagePullSecret" . }} +{{- end }} {{- end }} --- {{- if and .Values.istio.ingress.key .Values.istio.ingress.cert }} diff --git a/chart/templates/logging/fluentbit/fluentbit-helmrelease.yaml b/chart/templates/logging/fluentbit/fluentbit-helmrelease.yaml index 60dcbc10ef2d8b2e55a2fad66b01ff4848dff507..98a73b5313d24e9ea6487878a3eb571f92824179 100644 --- a/chart/templates/logging/fluentbit/fluentbit-helmrelease.yaml +++ b/chart/templates/logging/fluentbit/fluentbit-helmrelease.yaml @@ -48,6 +48,11 @@ spec: imagePullSecrets: - name: private-registry + {{- if .Values.openshift }} + podSecurityContext: + seLinuxOptions: + type: "spc_t" + {{- end }} {{/* ECK and Logging _always_ depend on .Values.logging being enabled, so can assume they exist here */}} dependsOn: diff --git a/chart/templates/monitoring/monitoring-helmrelease.yaml b/chart/templates/monitoring/monitoring-helmrelease.yaml index 91a558e1582b182c83942162d0924f80d17e3272..d12aa0d9e64af7f463c13a08cd09b98587e5d9ce 100644 --- a/chart/templates/monitoring/monitoring-helmrelease.yaml +++ b/chart/templates/monitoring/monitoring-helmrelease.yaml @@ -90,6 +90,11 @@ spec: serviceAccount: imagePullSecrets: - name: private-registry + {{- if .Values.openshift }} + service: + targetPort: 9102 + port: 9102 + {{- end }} kube-state-metrics: imagePullSecrets: - name: private-registry diff --git a/chart/values.yaml b/chart/values.yaml index 99ad02dd2b57a776ae2a665471814852124b7dd7..bd570ca51837a666c6867a819651f8692bf081c2 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -24,6 +24,9 @@ registryCredentials: # password: "" # email: "" +# Openshift Container Platform Feature Toggle +openshift: false + # -- Git credential settings for accessing private repositories # Order of precedence is: # 1. existingSecret diff --git a/scripts/lint_changelog.sh b/scripts/lint_changelog.sh index cd5278654805985acd427649c423bdc265dc2f09..5d493e99d006ab223d2964f4b1214c006f328068 100755 --- a/scripts/lint_changelog.sh +++ b/scripts/lint_changelog.sh @@ -2,9 +2,10 @@ # diff the file silently, while still printing errors git diff --exit-code origin/${CI_DEFAULT_BRANCH}:${CHANGELOG_FILE} ${CHANGELOG_FILE} >/dev/null +differr=$? # exit code of 0 indicates non changed file -if [ $? -eq 0 ]; then +if [ $differr -eq 0 ]; then echo "No changes were detected in ${CHANGELOG_FILE}, please update this file" exit 1 fi @@ -12,7 +13,7 @@ fi # exit code other than 0 and 1 is an error # IE - different file names between branches # check for this and fail accordingly -if [ $? -ne 1 ]; then +if [ $differr -ne 1 ]; then echo "Error: An unknown error has occurred while linting ${CHANGELOG_FILE}" exit 1 fi