-
Notifications
You must be signed in to change notification settings - Fork 0
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
205 deploy approval app #206
Open
longshuicy
wants to merge
13
commits into
develop
Choose a base branch
from
205-deploy-approval-app
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ba08d3a
initialize the app
longshuicy 9fe406c
add values
longshuicy 28c884c
add environment variable the naive way
longshuicy e82c613
update repository name
longshuicy ad72d31
use hostname as the pattern
longshuicy e1cc463
Comment out probs from approval to test
ywkim312 91b025e
update the port
longshuicy c0ee842
matching targetPort
longshuicy a53fe84
allow ovewrite
longshuicy 1cd6c35
enable liveness and readiness probe
longshuicy 3dbac4f
add changelog / chart, use secrets as default keycloak password
longshuicy ee501ab
fix hardcode values
longshuicy 2415e16
remove real values from values.yaml
longshuicy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "incore.fullname" . }}-approval | ||
labels: | ||
{{- include "incore.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.approval.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "incore.name" . }}-approval | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
strategy: | ||
type: RollingUpdate | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "incore.name" . }}-approval | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
{{- with .Values.approval.image.pullSecrets | default .Values.image.pullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: approval | ||
image: "{{ .Values.image.project }}/{{ .Values.approval.image.repository }}:{{ .Values.approval.image.tag }}" | ||
imagePullPolicy: {{ .Values.approval.image.pullPolicy | default .Values.image.pullPolicy }} | ||
env: | ||
- name: ADMIN_LIST | ||
value: {{ .Values.approval.ADMIN_LIST | quote }} | ||
- name: KEYCLOAK_USERNAME | ||
value: {{ .Values.approval.KEYCLOAK_USERNAME | quote }} | ||
- name: KEYCLOAK_PASSWORD | ||
{{- if .Values.approval.KEYCLOAK_PASSWORD }} | ||
value: {{ .Values.approval.KEYCLOAK_PASSWORD | quote }} | ||
{{- else }} | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ include "incore.fullname" . }}-services | ||
key: KEYCLOAK_PASSWORD | ||
{{- end }} | ||
- name: KEYCLOAK_URL | ||
value: {{ .Values.approval.KEYCLOAK_URL | default .Values.keycloak.auth.url | default (printf | ||
"https://%s/auth/" (first .Values.keycloak.ingress.rules).host) | quote }} | ||
- name: APPROVE_APP_URL | ||
value: {{ .Values.approval.APPROVE_APP_URL | default .Values.keycloak.auth.approveAppUrl | default (printf "https://%s/approval/approve" (first .Values.keycloak.ingress.rules).host) | quote }} | ||
- name: EMAIL_FROM | ||
value: {{ .Values.approval.EMAIL_FROM | quote }} | ||
- name: SMTP_SERVER | ||
value: {{ .Values.approval.SMTP_SERVER | quote }} | ||
- name: SMTP_PORT | ||
value: {{ .Values.approval.SMTP_PORT | quote }} | ||
ports: | ||
- containerPort: {{ .Values.approval.service.port }} | ||
name: approval | ||
livenessProbe: | ||
httpGet: | ||
path: /approval/healthz | ||
port: approval | ||
readinessProbe: | ||
httpGet: | ||
path: /approval/healthz | ||
port: approval | ||
resources: | ||
{{- toYaml .Values.approval.resources | nindent 12 }} | ||
{{- with .Values.approval.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.approval.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.approval.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $fullName := include "incore.fullname" . -}} | ||
{{- $svcPort := .Values.approval.service.port -}} | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }}-approval | ||
labels: | ||
{{- include "incore.labels" . | nindent 4 }} | ||
annotations: | ||
{{- include "incore.authIngressAnnotation" . | nindent 4 }} | ||
spec: | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- range .Values.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
- host: {{ .host | quote }} | ||
http: | ||
paths: | ||
- path: /approval/ | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: {{ $fullName }}-approval | ||
port: | ||
number: {{ $svcPort }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "incore.fullname" . }}-approval | ||
labels: | ||
{{- include "incore.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: {{ include "incore.name" . }}-approval | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
type: {{ .Values.approval.service.type }} | ||
ports: | ||
- port: {{ .Values.approval.service.port }} | ||
name: approval | ||
targetPort: {{ .Values.approval.service.port }} | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -634,6 +634,26 @@ keycloak: | |
extraVolumeMounts: | | ||
- name: incore-theme | ||
mountPath: /opt/bitnami/keycloak/themes/incore-theme | ||
|
||
|
||
# ---------------------------------------------------------------------- | ||
# APPROVAL APP CONFIGURATION | ||
# ---------------------------------------------------------------------- | ||
approval: | ||
replicas: 1 | ||
image: | ||
repository: approval-app | ||
tag: master | ||
service: | ||
type: ClusterIP | ||
port: 5000 | ||
ingress: | ||
annotations: | ||
ADMIN_LIST: [email protected],[email protected] | ||
KEYCLOAK_USERNAME: keycloak | ||
EMAIL_FROM: [email protected] | ||
SMTP_SERVER: smtp.server.name | ||
SMTP_PORT: 25 | ||
|
||
# ---------------------------------------------------------------------- | ||
# CRONJOBS | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let not put the direct insert of KEYCLOAK password in here, instead just make it only to use the secret like you put below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but I would need to overwrite it with production keycloak password on dev, hence I have this additional logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dev and prod uses different secret so you can set it in there, instead of directly put