init
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
|
||||
data:
|
||||
devSpaceUrl: {{ $.Values.devSpaceUrl | quote }}
|
||||
standOwner: {{ $.Values.stand.owner | quote }}
|
||||
standName: {{ $.Values.stand.name | quote }}
|
||||
standTitle: {{ $.Values.stand.title | quote }}
|
||||
application.yaml: |
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://db-p-dl1-01.isb:5432/devspace
|
||||
username: ${DB_USERNAME}
|
||||
password: ${DB_PASSWORD}
|
||||
cloud:
|
||||
vault:
|
||||
enabled: true
|
||||
uri: https://vault.utility.isb
|
||||
authentication: approle
|
||||
app-role:
|
||||
role-id: ${vault_app_role_role_id}
|
||||
secret-id: ${vault_app_role_secret_id}
|
||||
fail-fast: true
|
||||
config:
|
||||
lifecycle:
|
||||
enabled: false
|
||||
session:
|
||||
lifecycle:
|
||||
enabled: false
|
||||
|
||||
config:
|
||||
import: vault://pcp/prod/platform-devspace/platform-devspace-apiregistry-core-service
|
||||
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: true
|
||||
|
||||
logging:
|
||||
level:
|
||||
root: INFO
|
||||
org.springframework: INFO
|
||||
ru: INFO
|
||||
flyway: INFO
|
||||
@@ -0,0 +1,123 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: "{{$.Release.Name}}-{{$.Values.name}}"
|
||||
labels:
|
||||
{{- if $.Values.labels}}
|
||||
{{- toYaml $.Values.labels | nindent 4 }}
|
||||
{{- end}}
|
||||
app.kubernetes.io/name: {{$.Values.name}}
|
||||
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}
|
||||
spec:
|
||||
{{- if not $.Values.autoscaling.enabled }}
|
||||
{{ if $.Values.replicaCount }}
|
||||
replicas: {{ $.Values.replicaCount }}
|
||||
{{ else }}
|
||||
replicas: 1
|
||||
{{end}}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{$.Values.name}}
|
||||
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
metric.binom.pw/enabled: '{{$.Values.metrics}}'
|
||||
{{ if ($.Values.metrics) }}
|
||||
metric.binom.pw/url: ":9090/prometheus"
|
||||
{{ end }}
|
||||
{{- with $.Values.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{$.Values.name}}
|
||||
app.kubernetes.io/instance: {{ $.Release.Name }}
|
||||
{{/* app.kubernetes.io/version: {{ $.Chart.AppVersion | quote }}*/}}
|
||||
spec:
|
||||
{{- with $.Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{ if $.Values.serviceAccount }}
|
||||
serviceAccountName: {{ $.Values.serviceAccount.name }}
|
||||
{{ end }}
|
||||
volumes:
|
||||
- name: application-properties-volume
|
||||
configMap:
|
||||
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
|
||||
items:
|
||||
- key: application.yaml
|
||||
path: application.yaml
|
||||
securityContext:
|
||||
{{- toYaml $.Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ $.Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml $.Values.securityContext | nindent 12 }}
|
||||
image: "{{ $.Values.image.name }}:{{ default $.Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ $.Values.image.pullPolicy }}
|
||||
env:
|
||||
- name: STAND_TITLE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
|
||||
key: standTitle
|
||||
- name: STAND_NAME
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
|
||||
key: standName
|
||||
- name: STAND_OWNER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
|
||||
key: standOwner
|
||||
- name: DEVSPACE_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: {{$.Release.Name}}-{{$.Chart.Name}}-main-config
|
||||
key: devSpaceUrl
|
||||
- name: STRONG_CONFIG_YAML
|
||||
value: /config/application.yaml
|
||||
volumeMounts:
|
||||
- mountPath: '/opt/app/config'
|
||||
name: application-properties-volume
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ $.Values.port }}
|
||||
protocol: TCP
|
||||
- name: management
|
||||
containerPort: {{ $.Values.managementPort }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: '/actuator/health/liveness'
|
||||
port: management
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: '/actuator/health/readiness'
|
||||
port: management
|
||||
initialDelaySeconds: 25
|
||||
periodSeconds: 10
|
||||
{{- if $.Values.resources}}
|
||||
resources:
|
||||
{{- toYaml $.Values.resources | nindent 12}}
|
||||
{{- else}}
|
||||
resources: { }
|
||||
{{end}}
|
||||
{{- with $.Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $.Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $.Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user