UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 29f1a62b authored by Tim Hutchens's avatar Tim Hutchens :seedling: Committed by Josh Wolf
Browse files

feat: add initial support for openshift (ocp)

parent c567ef07
No related branches found
No related tags found
1 merge request!202OpenShift Container Platform enhancements
Pipeline #175753 passed
...@@ -47,6 +47,7 @@ spec: ...@@ -47,6 +47,7 @@ spec:
imagePullSecrets: imagePullSecrets:
- private-registry - private-registry
openshift: {{ .Values.openshift }}
{{- if .Values.istio.sso.enabled }} {{- if .Values.istio.sso.enabled }}
ingress: ingress:
......
...@@ -21,6 +21,17 @@ metadata: ...@@ -21,6 +21,17 @@ metadata:
type: kubernetes.io/dockerconfigjson type: kubernetes.io/dockerconfigjson
data: data:
.dockerconfigjson: {{ template "imagePullSecret" . }} .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 }} {{- end }}
--- ---
{{- if and .Values.istio.ingress.key .Values.istio.ingress.cert }} {{- if and .Values.istio.ingress.key .Values.istio.ingress.cert }}
......
...@@ -48,6 +48,11 @@ spec: ...@@ -48,6 +48,11 @@ spec:
imagePullSecrets: imagePullSecrets:
- name: private-registry - 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 */}} {{/* ECK and Logging _always_ depend on .Values.logging being enabled, so can assume they exist here */}}
dependsOn: dependsOn:
......
...@@ -90,6 +90,11 @@ spec: ...@@ -90,6 +90,11 @@ spec:
serviceAccount: serviceAccount:
imagePullSecrets: imagePullSecrets:
- name: private-registry - name: private-registry
{{- if .Values.openshift }}
service:
targetPort: 9102
port: 9102
{{- end }}
kube-state-metrics: kube-state-metrics:
imagePullSecrets: imagePullSecrets:
- name: private-registry - name: private-registry
......
...@@ -24,6 +24,9 @@ registryCredentials: ...@@ -24,6 +24,9 @@ registryCredentials:
# password: "" # password: ""
# email: "" # email: ""
# Openshift Container Platform Feature Toggle
openshift: false
# -- Git credential settings for accessing private repositories # -- Git credential settings for accessing private repositories
# Order of precedence is: # Order of precedence is:
# 1. existingSecret # 1. existingSecret
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
# diff the file silently, while still printing errors # diff the file silently, while still printing errors
git diff --exit-code origin/${CI_DEFAULT_BRANCH}:${CHANGELOG_FILE} ${CHANGELOG_FILE} >/dev/null git diff --exit-code origin/${CI_DEFAULT_BRANCH}:${CHANGELOG_FILE} ${CHANGELOG_FILE} >/dev/null
differr=$?
# exit code of 0 indicates non changed file # 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" echo "No changes were detected in ${CHANGELOG_FILE}, please update this file"
exit 1 exit 1
fi fi
...@@ -12,7 +13,7 @@ fi ...@@ -12,7 +13,7 @@ fi
# exit code other than 0 and 1 is an error # exit code other than 0 and 1 is an error
# IE - different file names between branches # IE - different file names between branches
# check for this and fail accordingly # 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}" echo "Error: An unknown error has occurred while linting ${CHANGELOG_FILE}"
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment