mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-02 17:10:18 +01:00
templatized env & args redundancy
This commit is contained in:
parent
e49de34786
commit
182ab89d1e
2 changed files with 32 additions and 37 deletions
|
@ -19,42 +19,21 @@ spec:
|
||||||
app.kubernetes.io/name: {{ include "transfersh.name" . }}
|
app.kubernetes.io/name: {{ include "transfersh.name" . }}
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
|
{{- $keyRefSource := .Values.argValues.source.type -}}
|
||||||
|
{{- $keyRefName := .Values.argValues.source.name -}}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
{{- range .Values.argValues.paramNames }}
|
||||||
env:
|
env:
|
||||||
- name: HTTP_AUTH_USER
|
- name: {{ . | upper }}
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
{{ $keyRefSource }}:
|
||||||
name: transfersh-secrets
|
name: {{ $keyRefName }}
|
||||||
key: HTTP_AUTH_USER
|
key: {{ . | upper }}
|
||||||
- name: HTTP_AUTH_PASS
|
{{- end }}
|
||||||
valueFrom:
|
args: [ {{- range .Values.argValues.paramNames }} {{ printf "%s%s" $.Values.argIdentifier . | quote}},{{ printf "%s%s%s" "$(" . ")" | upper | quote}},{{- end }} ]
|
||||||
secretKeyRef:
|
|
||||||
name: transfersh-secrets
|
|
||||||
key: HTTP_AUTH_PASS
|
|
||||||
- name: AWS_ACCESS_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: transfersh-secrets
|
|
||||||
key: AWS_ACCESS_KEY
|
|
||||||
- name: AWS_SECRET_KEY
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: transfersh-secrets
|
|
||||||
key: AWS_SECRET_KEY
|
|
||||||
- name: AWS_BUCKET_NAME
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: transfersh-secrets
|
|
||||||
key: AWS_BUCKET_NAME
|
|
||||||
- name: AWS_BUCKET_REGION
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: transfersh-secrets
|
|
||||||
key: AWS_BUCKET_REGION
|
|
||||||
args: ["--http-auth-user","$(HTTP_AUTH_USER)","--http-auth-pass","$(HTTP_AUTH_PASS)","--provider","s3","--aws-access-key","$(AWS_ACCESS_KEY)","--aws-secret-key","$(AWS_SECRET_KEY)","--bucket","$(AWS_BUCKET_NAME)","--s3-region","$(AWS_BUCKET_REGION)","--proxy-path",""]
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
# Default values for transfersh.
|
---
|
||||||
# This is a YAML-formatted file.
|
|
||||||
# Declare variables to be passed into your templates.
|
|
||||||
|
|
||||||
replicaCount: 1
|
replicaCount: 1
|
||||||
|
|
||||||
image:
|
image:
|
||||||
repository: dutchcoders/transfer.sh
|
repository: dutchcoders/transfer.sh
|
||||||
tag: latest
|
tag: latest
|
||||||
|
@ -18,11 +14,31 @@ service:
|
||||||
externalPort: 80
|
externalPort: 80
|
||||||
internalPort: 8080
|
internalPort: 8080
|
||||||
|
|
||||||
|
errorValues:
|
||||||
|
varValue : UltraBadValue
|
||||||
|
|
||||||
|
argIdentifier: "--"
|
||||||
|
|
||||||
|
argValues : {
|
||||||
|
"source" :{
|
||||||
|
"type" : "secretKeyRef",
|
||||||
|
"name" : "transfersh-secrets"
|
||||||
|
},
|
||||||
|
"paramNames" :[
|
||||||
|
"http-auth-user",
|
||||||
|
"http-auth-pass",
|
||||||
|
"provider",
|
||||||
|
"aws-access-key",
|
||||||
|
"aws-secret-key",
|
||||||
|
"bucket",
|
||||||
|
"s3-region",
|
||||||
|
"proxy-path"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: false
|
||||||
annotations: {}
|
annotations: {}
|
||||||
# kubernetes.io/ingress.class: nginx
|
|
||||||
# kubernetes.io/tls-acme: "true"
|
|
||||||
path: /
|
path: /
|
||||||
hosts:
|
hosts:
|
||||||
- transfersh.local
|
- transfersh.local
|
||||||
|
|
Loading…
Reference in a new issue