-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Victor Getz
committed
Jan 5, 2024
1 parent
de40b19
commit 281bb38
Showing
17 changed files
with
481 additions
and
22 deletions.
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,4 @@ | ||
apiVersion: v2 | ||
name: blueprints | ||
type: application | ||
version: 1.4.2 |
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
58 changes: 58 additions & 0 deletions
58
blueprints/templates/infrastructure-charts/deployment-values.yaml
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,58 @@ | ||
deployment: | ||
replicaCount: "2" | ||
|
||
image: | ||
repository: #REPLACE_ME | ||
pullPolicy: IfNotPresent | ||
tag: #REPLACE_ME | ||
|
||
imagePullSecrets: [ ] | ||
nameOverride: "" | ||
fullnameOverride: "" | ||
|
||
podAnnotations: { } | ||
|
||
podSecurityContext: | ||
# fsGroup: 2000 | ||
|
||
securityContext: | ||
# capabilities: | ||
# drop: | ||
# - ALL | ||
# readOnlyRootFilesystem: true | ||
# runAsNonRoot: true | ||
# runAsUser: 1000 | ||
|
||
volumes: { } | ||
volumeMounts: { } | ||
|
||
affinity: { } | ||
|
||
ports: | ||
http: | ||
|
||
health: | ||
startupProbe: | ||
path: "/" | ||
# initialDelaySeconds: # defaults to 20 | ||
# periodSeconds: # defaults to 20 | ||
# failureThreshold: # defaults to 3 | ||
# port: # defaults to 80 | ||
liveness: | ||
path: "/" | ||
# initialDelaySeconds: # defaults to 20 | ||
# periodSeconds: # defaults to 20 | ||
# failureThreshold: # defaults to 3 | ||
# port: # defaults to 80 | ||
readiness: | ||
path: "/" | ||
# initialDelaySeconds: # defaults to 20 | ||
# periodSeconds: # defaults to 20 | ||
# failureThreshold: # defaults to 3 | ||
# port: # defaults to 80 | ||
|
||
env: | ||
MUH: "KUH" | ||
|
||
#set the secret where to take env from | ||
envFromSecret: |
106 changes: 106 additions & 0 deletions
106
blueprints/templates/infrastructure-charts/deployment.yaml
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,106 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "myService.fullname" . }} | ||
labels: | ||
{{- include "myService.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.deployment.replicaCount }} | ||
revisionHistoryLimit: 3 | ||
selector: | ||
matchLabels: | ||
{{- include "myService.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.deployment.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "myService.selectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- if .Values.deployment.onePodForEachNode}} | ||
affinity: | ||
podAntiAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: "app" | ||
operator: In | ||
values: | ||
- {{ include "myService.fullname" . }} | ||
topologyKey: "kubernetes.io/hostname" | ||
{{- end}} | ||
{{- with .Values.deployment.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
serviceAccountName: {{ include "myService.serviceAccountName" . }} | ||
{{- if .Values.deployment.podSecurityContext }} | ||
securityContext: | ||
{{- toYaml .Values.deployment.podSecurityContext | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- name: {{ .Release.Name }} | ||
{{- if .Values.deployment.securityContext }} | ||
securityContext: | ||
{{- toYaml .Values.deployment.securityContext | nindent 12 }} | ||
{{- end }} | ||
image: "{{ tpl .Values.deployment.image.repository . }}:{{ .Values.deployment.image.tag }}" | ||
imagePullPolicy: {{ .Values.deployment.image.pullPolicy }} | ||
env: | ||
{{- range $key, $value := .Values.deployment.env }} | ||
- name: {{ printf "%s" $key | replace "." "_" | upper | quote }} | ||
value: {{ tpl ($value | toString) $ | quote }} | ||
{{- end }} | ||
{{- if .Values.deployment.envSecretName}} | ||
envFrom: | ||
- secretRef: | ||
name: {{.Values.deployment.envSecretName}} | ||
{{- end }} | ||
ports: | ||
{{- range $name,$values := .Values.deployment.ports }} | ||
- name: {{$name }} | ||
protocol: {{ ($values).protocol | default "TCP"}} | ||
containerPort: {{($values).port | default 80 }} | ||
{{- end }} | ||
{{- with ((.Values.deployment).health).liveness }} | ||
livenessProbe: | ||
httpGet: | ||
path: {{ tpl .path $ | default "/" }} | ||
port: {{ .port | default 80 }} | ||
initialDelaySeconds: {{ .initialDelaySeconds | default 20 }} | ||
periodSeconds: 5 | ||
failureThreshold: {{ .failureThreshold | default 5 }} | ||
{{- end }} | ||
{{- with ((.Values.deployment).health).readiness }} | ||
readinessProbe: | ||
httpGet: | ||
path: {{ tpl .path $ | default "/" }} | ||
port: {{ .port | default 80 }} | ||
initialDelaySeconds: {{ .initialDelaySeconds | default 20 }} | ||
periodSeconds: 5 | ||
failureThreshold: {{ .failureThreshold | default 5 }} | ||
{{- end }} | ||
resources: | ||
{{- toYaml .Values.deployment.resources | nindent 12 }} | ||
{{- with .Values.deployment.volumeMounts }} | ||
volumeMounts: | ||
{{- toYaml . | nindent 12 }} | ||
{{- end }} | ||
{{- with .Values.deployment.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.deployment.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.deployment.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.deployment.volumes }} | ||
volumes: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
blueprints/templates/infrastructure-charts/service-monitor-values.yaml
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,8 @@ | ||
serviceMonitor: | ||
enabled: true | ||
# Default values, override them if necessary | ||
#labels: {} | ||
#annotations: {} | ||
#portName: "http" | ||
#interval: "10s" | ||
#path: "/metrics" |
22 changes: 22 additions & 0 deletions
22
blueprints/templates/infrastructure-charts/service-monitor.yaml
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,22 @@ | ||
{{- if .Values.serviceMonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ include "myService.fullname" $ }} | ||
{{- with .Values.serviceMonitor.labels }} | ||
labels: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- with .Values.serviceMonitor.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "myService.selectorLabels" . | nindent 6 }} | ||
endpoints: | ||
- port: {{ default "http" .Values.serviceMonitor.portName }} | ||
interval: {{ default "10s" .Values.serviceMonitor.interval }} | ||
path: {{ default "/metrics" .Values.serviceMonitor.path }} | ||
{{- end }} |
9 changes: 9 additions & 0 deletions
9
blueprints/templates/infrastructure-charts/service-values.yaml
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,9 @@ | ||
service: | ||
ports: | ||
http: | ||
#These values are the default values, override them if necessary | ||
#targetPort: 80 | ||
## port name from above | ||
#name: "http" | ||
#protocol: TCP | ||
#port: 80 |
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,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "myService.fullname" . }} | ||
labels: | ||
{{- include "myService.labels" . | nindent 4 }} | ||
spec: | ||
type: {{ (.Values.service).serviceType | default "ClusterIP"}} | ||
ports: | ||
{{- range $name,$values := .Values.service.ports }} | ||
- targetPort: {{ ($values).targetPort | default 80 }} | ||
name: {{ ($values).name | default $name }} | ||
protocol: {{ ($values).protocol | default "TCP"}} | ||
port: {{($values).port | default 80 }} | ||
{{- end }} | ||
selector: | ||
{{- include "myService.selectorLabels" . | nindent 4 }} |
8 changes: 8 additions & 0 deletions
8
blueprints/templates/infrastructure-charts/serviceaccount-values.yaml
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,8 @@ | ||
serviceAccount: | ||
# Specifies whether a service account should be created | ||
create: true | ||
# Annotations to add to the service account | ||
annotations: {} | ||
# The name of the service account to use. | ||
# If not set and create is true, a name is generated using the fullname template | ||
name: "" |
12 changes: 12 additions & 0 deletions
12
blueprints/templates/infrastructure-charts/serviceaccount.yaml
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,12 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: {{ include "myService.serviceAccountName" . }} | ||
labels: | ||
{{- include "myService.labels" . | nindent 4 }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end }} |
Oops, something went wrong.