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:
imagePullSecrets:
- private-registry
openshift: {{ .Values.openshift }}
{{- if .Values.istio.sso.enabled }}
ingress:
......
......@@ -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 }}
......
......@@ -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:
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
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