Skip to content

[0.4.0]-rc1. Prepare for chart-bump. #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## pre 1.0

### 0.4.0
* Add initScript container capability
* Bump nettools container image v1.10.0 -> v1.11.0

### 0.3.2

* add .helmignore for a clean chart
Expand Down
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: A helm chart for a SFTP server
name: sftp-server
version: 0.3.2
version: 0.4.0
25 changes: 24 additions & 1 deletion templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
{{- end }}
annotations:
{{- if .Values.vxlanController.enabled }}
{{ .Values.vxlanController.annotationKey }}: |
{{ .Values.vxlanController.annotationKey }}: |
{{ .Values.vxlanController.network }}
{{ if .Values.vxlanController.ip -}} ip= {{- .Values.vxlanController.ip }} {{- end}}
{{ if .Values.vxlanController.route -}} route= {{- .Values.vxlanController.route }} {{- end}}
Expand All @@ -42,6 +42,29 @@ spec:
capabilities:
add: ["NET_ADMIN"]
{{- end }}
{{- if .Values.initScript.enabled }}
- name: init-script
image: {{ .Values.initScript.image.repository }}:{{ .Values.initScript.image.tag }}
imagePullPolicy: {{ .Values.initScript.image.pullPolicy | quote }}
resources:
{{- toYaml .Values.resources.initScript | trimSuffix "\n" | nindent 10 }}
securityContext:
capabilities:
add: ["NET_ADMIN"]
{{- if .Values.initScript.additionalSecurityContext }}
{{- toYaml .Values.initScript.additionalSecurityContext | trimSuffix "\n" | indent 10 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ template "chart.fullname" . }}-init-script-env
command:
- sh
- /opt/initScript/initScript.sh
volumeMounts:
- name: init-script
mountPath: /opt/initScript/
readOnly: true
{{- end }}
containers:
{{- if .Values.debug.enabled }}
- name: debug
Expand Down
19 changes: 19 additions & 0 deletions templates/init-script-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.initScript.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "chart.fullname" . }}-init-script
labels:
{{- if .Values.labels }}
{{- toYaml .Values.labels | trimSuffix "\n" | nindent 4 }}
{{- end }}
app: {{ template "chart.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
cennso.net/cnf: smc
data:
initScript.sh: |
{{- .Values.initScript.script | trimSuffix "\n" | nindent 4 -}}
{{- end }}
18 changes: 18 additions & 0 deletions templates/init-script-env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
{{- if .Values.initScript.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "chart.fullname" . }}-init-script-env
labels:
{{- if .Values.labels }}
{{- toYaml .Values.labels | trimSuffix "\n" | nindent 4 }}
{{- end }}
app: {{ template "chart.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
cennso.net/cnf: smc
data:
{{- toYaml .Values.initScript.env | trimSuffix "\n" | nindent 2 }}
{{- end }}
19 changes: 18 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,21 @@ sftpConfig:
#- ssh_host_ed25519_key
authorizedKeys: {}

initScript:
enabled: false
env: {}
image:
repository: quay.io/travelping/nettools
tag: v1.11.0
pullPolicy: IfNotPresent
script: |
echo "script configuration is missing"

debug:
enabled: false
image:
repository: quay.io/travelping/nettools
tag: v1.10.0
tag: v1.11.0
pullPolicy: IfNotPresent

persistentVolume:
Expand Down Expand Up @@ -79,6 +89,13 @@ resources:
requests:
cpu: 50m
memory: 32Mi
networkInit:
limits:
cpu: 500m
memory: 192Mi
requests:
cpu: 500m
memory: 192Mi

nodeSelector: {}

Expand Down