Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the Sapor Gate Configurations #149

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions charts/oes/config/sapor-gate/gate-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
server:
tomcat:
httpsServerPort: X-Forwarded-Port
internalProxies: .*
protocolHeader: X-Forwarded-Proto
remoteIpHeader: X-Forwarded-For
security:
basicform:
enabled: true
user:
name: {{ .Values.saporgate.config.username }}
password: {{ .Values.saporgate.config.password }}
13 changes: 13 additions & 0 deletions charts/oes/config/sapor-gate/gate-overrides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## WARNING
## This file was autogenerated, and _will_ be overwritten by Halyard.
## Any edits you make here _will_ be lost.

services:
clouddriver:
baseUrl: http://spin-clouddriver-ro:7002
enabled: true
echo:
baseUrl: http://spin-echo-worker:8089
enabled: true

global.spinnaker.timezone: America/Los_Angeles
40 changes: 40 additions & 0 deletions charts/oes/config/sapor-gate/gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## WARNING
## This file was autogenerated, and _will_ be overwritten by Halyard.
## Any edits you make here _will_ be lost.

spectator:
applicationName: ${spring.application.name}
webEndpoint:
enabled: false

spinnaker:
extensibility:
plugins: {}
repositories: {}
plugins-root-path: /opt/gate/plugins
strict-plugin-loading: false

server:
ssl:
enabled: false
port: '8084'
address: 0.0.0.0
security:
basic:
enabled: true
user: {}
cors: {}
google: {}

integrations:
gremlin:
enabled: false
baseUrl: https://api.gremlin.com/v1

# halconfig

services:
clouddriver:
config:
dynamicEndpoints:
deck: http://spin-clouddriver-ro-deck:7002
97 changes: 97 additions & 0 deletions charts/oes/config/sapor-gate/spinnaker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
## WARNING
## This file was autogenerated, and _will_ be overwritten by Halyard.
## Any edits you make here _will_ be lost.

services:
clouddriver:
host: 0.0.0.0
port: 7002
baseUrl: http://spin-clouddriver:7002
enabled: false
clouddriverCaching:
host: 0.0.0.0
port: 7002
baseUrl: http://spin-clouddriver-caching:7002
enabled: true
clouddriverRo:
host: 0.0.0.0
port: 7002
baseUrl: http://spin-clouddriver-ro:7002
enabled: true
clouddriverRoDeck:
host: 0.0.0.0
port: 7002
baseUrl: http://spin-clouddriver-ro-deck:7002
enabled: true
clouddriverRw:
host: 0.0.0.0
port: 7002
baseUrl: http://spin-clouddriver-rw:7002
enabled: true
deck:
host: 0.0.0.0
port: 9000
baseUrl: {{ .Values.global.spinDeck.protocol }}://{{ .Values.global.spinDeck.host }}
enabled: true
echo:
host: 0.0.0.0
port: 8089
baseUrl: http://spin-echo:8089
enabled: false
echoScheduler:
host: 0.0.0.0
port: 8089
baseUrl: http://spin-echo-scheduler:8089
enabled: true
echoWorker:
host: 0.0.0.0
port: 8089
baseUrl: http://spin-echo-worker:8089
enabled: true
fiat:
host: 0.0.0.0
port: 7003
baseUrl: http://spin-fiat:7003
enabled: false
front50:
host: 0.0.0.0
port: 8080
baseUrl: http://spin-front50:8080
enabled: true
gate:
host: 0.0.0.0
port: 8084
baseUrl: {{ .Values.global.spinGate.protocol }}://{{ .Values.global.spinGate.host }}
enabled: true
igor:
host: 0.0.0.0
port: 8088
baseUrl: http://spin-igor:8088
enabled: true
kayenta:
host: 0.0.0.0
port: 8090
baseUrl: http://spin-kayenta:8090
enabled: false
orca:
host: 0.0.0.0
port: 8083
baseUrl: http://spin-orca:8083
enabled: true
redis:
host: 0.0.0.0
port: 6379
baseUrl: redis://:password@{{ .Release.Name}}-redis-master:6379
enabled: true
rosco:
host: 0.0.0.0
port: 8087
baseUrl: http://spin-rosco:8087
enabled: true
monitoringDaemon:
host: 0.0.0.0
port: 8008
baseUrl: http://spin-monitoring-daemon:8008
enabled: false

global.spinnaker.timezone: America/Los_Angeles
Empty file.
10 changes: 10 additions & 0 deletions charts/oes/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ Return the proper GATE image name
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}

{{/*
Return the proper SAPOR GATE image name
*/}}
{{- define "saporgate.image" -}}
{{- $registryName := .Values.saporgate.image.registry -}}
{{- $repositoryName := .Values.saporgate.image.repository -}}
{{- $tag := .Values.saporgate.image.tag | toString -}}
{{- printf "%s/%s:%s" $registryName $repositoryName $tag -}}
{{- end -}}

{{/*
Return the proper SAPOR image name
*/}}
Expand Down
55 changes: 55 additions & 0 deletions charts/oes/templates/sapor-gate/sapor-gate-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{{- if or (eq .Values.installationMode "OES-AP") (eq .Values.installationMode "OES") -}}
{{- if .Values.saporgate.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
labels:
app: oes
component: sapor-gate
{{ include "oes.standard-labels" . | indent 4 }}
name: sapor-gate
spec:
replicas: 1
selector:
matchLabels:
app: oes
component: sapor-gate
template:
metadata:
labels:
app: oes
component: sapor-gate
{{ include "oes.standard-labels" . | indent 8 }}
spec:
containers:
- image: {{ template "saporgate.image" . }}
name: sapor-gate
env:
- name: JAVA_OPTS
value: -XX:MaxRAMPercentage=100.0
- name: SPRING_PROFILES_ACTIVE
value: overrides,local
ports:
- containerPort: 8084
protocol: TCP
resources:
{{ toYaml .Values.saporgate.resources | indent 12 }}
volumeMounts:
- mountPath: /opt/spinnaker/config
name: sapor-gate-files
readinessProbe:
failureThreshold: 3
httpGet:
path: /health
port: 8084
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
volumes:
- name: sapor-gate-files
secret:
secretName: sapor-gate-files
{{- end -}}
{{- end -}}
18 changes: 18 additions & 0 deletions charts/oes/templates/sapor-gate/sapor-gate-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if or (eq .Values.installationMode "OES-AP") (eq .Values.installationMode "OES") -}}
{{- if .Values.saporgate.enabled }}
apiVersion: v1
data:
gate-local.yml: {{- tpl (.Files.Get "config/sapor-gate/gate-local.yml") . |b64enc | nindent 4 }}
gate-overrides.yml: {{- tpl (.Files.Get "config/sapor-gate/gate-overrides.yml") . |b64enc | nindent 4 }}
gate.yml: {{- tpl (.Files.Get "config/sapor-gate/gate.yml") . |b64enc | nindent 4 }}
spinnaker.yml: {{- tpl (.Files.Get "config/sapor-gate/spinnaker.yml") . |b64enc | nindent 4 }}
spinnakerconfig.yml: {{- tpl (.Files.Get "config/sapor-gate/spinnakerconfig.yml") . |b64enc | nindent 4 }}
kind: Secret
metadata:
labels:
app: oes
component: sapor-gate
name: sapor-gate-files
type: Opaque
{{ end }}
{{- end -}}
22 changes: 22 additions & 0 deletions charts/oes/templates/sapor-gate/sapor-gate-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if or (eq .Values.installationMode "OES-AP") (eq .Values.installationMode "OES") -}}
{{- if .Values.saporgate.enabled }}
apiVersion: v1
kind: Service
metadata:
labels:
app: spin
component: sapor-gate
{{ include "oes.standard-labels" . | indent 4 }}
name: sapor-gate
spec:
type: {{ .Values.k8sServiceType }}
ports:
- name: "sapor-gate-service"
port: 8084
protocol: TCP
targetPort: 8084
selector:
app: oes
component: sapor-gate
{{- end -}}
{{- end -}}
28 changes: 28 additions & 0 deletions charts/oes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,32 @@ db:
## storageClass for DB persistent volume claim (PVC)
##
#storageClassName: default
###############################################################################
## Use this SAPOR GATE Configuration to Enable Basic Authentication for OES SAPOR to communitcate
## with spinnaker instead of x509
## Values of SAPOR OES Gate
##
saporgate:
## Image specific details
##
enabled: true
image:
registry: quay.io/opsmxpublic
repository: ubi8-spin-gate
tag: 1.20.0
pullPolicy: IfNotPresent

resources: {}
# requests:
# memory: 500Mi
# cpu: 500m
# limits:
# memory: 1500Mi
# cpu: 1500m

config:
username: admin
password: saporadmin # Any generic String.

###############################################################################
##
Expand Down Expand Up @@ -552,6 +578,8 @@ visibility:
## Logger level
logLevel: ERROR



###############################################################################
## This option enables OES to be configured automatically
## Load Balancer IPs will be automatically replaced in the
Expand Down