Init
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: pcp-spring-boot-admin-server
|
||||
description: Helm chart for deploying pcp-spring-boot-admin-server from GitLab CI/CD.
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.0.0"
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- define "pcp-spring-boot-admin-server.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pcp-spring-boot-admin-server.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- include "pcp-spring-boot-admin-server.name" . | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "pcp-spring-boot-admin-server.labels" -}}
|
||||
app.kubernetes.io/name: {{ include "pcp-spring-boot-admin-server.name" . }}
|
||||
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,68 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "pcp-spring-boot-admin-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "pcp-spring-boot-admin-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "pcp-spring-boot-admin-server.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "pcp-spring-boot-admin-server.labels" . | nindent 8 }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- with .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range . }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ include "pcp-spring-boot-admin-server.name" . }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: {{ .Values.app.profile | quote }}
|
||||
- name: CONFIG_SERVER_URI
|
||||
value: {{ .Values.app.configServerUri | quote }}
|
||||
- name: SPRING_CLOUD_CONFIG_LABEL
|
||||
value: {{ .Values.app.configLabel | quote }}
|
||||
- name: CONFIG_SERVER_FAIL_FAST
|
||||
value: {{ .Values.app.configServerFailFast | quote }}
|
||||
- name: SERVER_PORT
|
||||
value: {{ .Values.service.port | quote }}
|
||||
{{- with .Values.extraEnv }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: http
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /actuator/health
|
||||
port: http
|
||||
initialDelaySeconds: 40
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 5
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
@@ -0,0 +1,31 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "pcp-spring-boot-admin-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "pcp-spring-boot-admin-server.labels" . | nindent 4 }}
|
||||
{{- with .Values.ingress.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.ingress.className }}
|
||||
ingressClassName: {{ .Values.ingress.className | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.ingress.tls }}
|
||||
tls:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.ingress.host | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ .Values.ingress.path | quote }}
|
||||
pathType: {{ .Values.ingress.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "pcp-spring-boot-admin-server.fullname" . }}
|
||||
port:
|
||||
number: {{ .Values.service.port }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "pcp-spring-boot-admin-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "pcp-spring-boot-admin-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "pcp-spring-boot-admin-server.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
@@ -0,0 +1,10 @@
|
||||
app:
|
||||
profile: dev
|
||||
configLabel: dev
|
||||
|
||||
service:
|
||||
port: 38889
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
host: pcp-spring-boot-admin-server.dev.k8s.264.nstart.cloud
|
||||
@@ -0,0 +1,36 @@
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: registry.example.com/pcp/pcp-spring-boot-admin-server
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecrets: []
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 38889
|
||||
|
||||
app:
|
||||
profile: master
|
||||
configServerUri: "http://spring-cloud-config-server:38888"
|
||||
configServerFailFast: "true"
|
||||
configLabel: master
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
host: ""
|
||||
path: /
|
||||
pathType: Prefix
|
||||
tls: []
|
||||
|
||||
extraEnv: []
|
||||
|
||||
resources: {}
|
||||
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
Reference in New Issue
Block a user