Created
September 15, 2020 06:26
-
-
Save m4r10k/dec6ba377275e666f862aadae0b51339 to your computer and use it in GitHub Desktop.
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ (ds "data").name }}-{{ (ds "data").suffix }} | |
namespace: {{ (ds "data").namespace }} | |
spec: | |
replicas: {{ (ds "config").replicas }} | |
selector: | |
matchLabels: | |
service: {{ (ds "data").name }}-{{ (ds "data").suffix }} | |
template: | |
metadata: | |
labels: | |
{{ range $key, $value := (ds "data").labels }} | |
{{$key}}: {{$value}} | |
{{ end }} | |
service: {{ (ds "data").name }}-{{ (ds "data").suffix }} | |
spec: | |
securityContext: | |
{{- if has (ds "data") "runasid" }} | |
runAsUser: {{ (ds "data").runasid }} | |
runAsGroup: {{ (ds "data").runasid }} | |
{{- end }} | |
containers: | |
- image: {{ (ds "config").image }} | |
name: {{ (ds "data").name }}-{{ (ds "data").suffix }} | |
ports: | |
- protocol: TCP | |
containerPort: {{ (ds "data").containerport }} | |
{{ if (file.Exists "./tmp/kploy-customize/yaml/20-kploy-secrets.yaml") }} | |
envFrom: | |
- secretRef: | |
name: {{ (ds "data").name }}-{{ (ds "data").suffix }} | |
{{ end }} | |
resources: | |
{{ (ds "config").resources | data.ToYAML | strings.Indent 10 }} | |
imagePullSecrets: | |
- name: regcred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment