Init
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: spring-cloud-config-server
|
||||
description: Helm chart for deploying spring-cloud-config-server from GitLab CI/CD.
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.0.0"
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- define "spring-cloud-config-server.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "spring-cloud-config-server.fullname" -}}
|
||||
{{- if .Values.fullnameOverride -}}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- include "spring-cloud-config-server.name" . | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "spring-cloud-config-server.labels" -}}
|
||||
app.kubernetes.io/name: {{ include "spring-cloud-config-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,75 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "spring-cloud-config-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "spring-cloud-config-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ include "spring-cloud-config-server.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "spring-cloud-config-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 "spring-cloud-config-server.name" . }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.targetPort }}
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: SERVER_PORT
|
||||
value: {{ .Values.service.targetPort | quote }}
|
||||
- name: CONFIG_GIT_URI
|
||||
value: {{ .Values.app.configGitUri | quote }}
|
||||
- name: CONFIG_GIT_USERNAME
|
||||
value: {{ .Values.app.configGitUsername | quote }}
|
||||
- name: CONFIG_GIT_DEFAULT_LABEL
|
||||
value: {{ .Values.app.configGitDefaultLabel | quote }}
|
||||
- name: CONFIG_GIT_SEARCH_PATHS
|
||||
value: {{ .Values.app.configGitSearchPaths | quote }}
|
||||
- name: CONFIG_GIT_SKIP_SSL_VALIDATION
|
||||
value: {{ .Values.app.configGitSkipSslValidation | quote }}
|
||||
- name: CONFIG_GIT_TOKEN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.gitTokenSecret.name | quote }}
|
||||
key: {{ .Values.gitTokenSecret.key | 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 "spring-cloud-config-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "spring-cloud-config-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 "spring-cloud-config-server.fullname" . }}
|
||||
port:
|
||||
number: {{ .Values.service.port }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "spring-cloud-config-server.fullname" . }}
|
||||
labels:
|
||||
{{- include "spring-cloud-config-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
selector:
|
||||
app.kubernetes.io/name: {{ include "spring-cloud-config-server.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
@@ -0,0 +1,14 @@
|
||||
app:
|
||||
configGitUri: "https://git.nstart.cloud/emelianov.an/pcp.git"
|
||||
configGitUsername: "gitlab+deploy-token-1"
|
||||
configGitDefaultLabel: "master"
|
||||
configGitSearchPaths: "config-repo"
|
||||
configGitSkipSslValidation: "true"
|
||||
|
||||
service:
|
||||
port: 38888
|
||||
targetPort: 8888
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
host: spring-cloud-config-server.dev.k8s.264.nstart.cloud
|
||||
@@ -0,0 +1,42 @@
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: registry.example.com/pcp/pcp-cloud-config-server
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
pullSecrets: []
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 38888
|
||||
targetPort: 8888
|
||||
|
||||
app:
|
||||
configGitUri: ""
|
||||
configGitUsername: "oauth2"
|
||||
configGitDefaultLabel: "master"
|
||||
configGitSearchPaths: "config-repo"
|
||||
configGitSkipSslValidation: "false"
|
||||
|
||||
gitTokenSecret:
|
||||
name: spring-cloud-config-server-git
|
||||
key: token
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
host: ""
|
||||
path: /
|
||||
pathType: Prefix
|
||||
tls: []
|
||||
|
||||
extraEnv: []
|
||||
|
||||
resources: {}
|
||||
|
||||
podAnnotations: {}
|
||||
podLabels: {}
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
Reference in New Issue
Block a user