Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 593756f621 | |||
| 8032acb1b9 | |||
| aafc0bbfab | |||
| 8720c33db4 | |||
| 775bd4b50c | |||
| 59f8aee710 | |||
| 3b9b6e30ae | |||
| 3a04385235 | |||
| bde9fdfe3f | |||
| 5eca12d8e1 | |||
| ea74075201 | |||
| c4f6e01ae5 | |||
| 858f5e31e0 | |||
| cb00d364d6 | |||
| b3b33a4b18 | |||
| a5933c0967 | |||
| 52b7f9926b | |||
| 3fda8ce594 | |||
| bcb020a12e | |||
| b2b6ac4a06 | |||
| af09d73974 | |||
| 5db236e7b2 | |||
| 20455220c5 | |||
| c4b19f2801 | |||
| ba5fabf679 | |||
| af56df9c19 | |||
| d0aa57c456 | |||
| 7b56a9d7c4 | |||
| 4943dc16c6 | |||
| 3445336501 | |||
| ddf8e253e7 |
@@ -96,6 +96,7 @@ jobs:
|
||||
|
||||
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/onechart/Chart.yaml
|
||||
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/cron-job/Chart.yaml
|
||||
sed -i "s/version: $CHART_VERSION/version: $increased_version/" charts/static-site/Chart.yaml
|
||||
|
||||
git status
|
||||
git add .
|
||||
|
||||
@@ -15,4 +15,4 @@ type: library
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
{{- define "common.envFromRef.tpl" -}}
|
||||
{{- if or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName }}
|
||||
{{- if or (or (or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName) .Values.existingConfigMaps) .Values.existingSecrets -}}
|
||||
envFrom: &envFrom
|
||||
{{- if .Values.vars }}
|
||||
- configMapRef:
|
||||
name: {{ template "common.robustName" .Release.Name }}
|
||||
{{- end }}
|
||||
{{- range .Values.existingSecrets }}
|
||||
- secretRef:
|
||||
name: {{ .name }}
|
||||
optional: {{ .optional | default false }}
|
||||
{{- end }}
|
||||
{{- range .Values.existingConfigMaps }}
|
||||
- configMapRef:
|
||||
name: {{ .name }}
|
||||
optional: {{ .optional | default false }}
|
||||
{{- end }}
|
||||
{{- if .Values.secretEnabled }}
|
||||
- secretRef:
|
||||
name: {{ include "common.robustName" $.Release.Name }}
|
||||
@@ -18,4 +28,4 @@ envFrom: &envFrom
|
||||
name: {{ template "common.robustName" .Release.Name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- define "common.volumeMountsRef.tpl" -}}
|
||||
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets }}
|
||||
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets -}}
|
||||
volumeMounts: &volumeMounts
|
||||
{{- range .Values.volumes }}
|
||||
{{- if not (hasPrefix "init-" .name) }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- define "common.volumesRef.tpl" -}}
|
||||
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets }}
|
||||
{{- if or (or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets) .Values.existingFileSecrets -}}
|
||||
volumes:
|
||||
{{- range .Values.volumes }}
|
||||
- name: {{ .name }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../common
|
||||
version: 0.3.0
|
||||
digest: sha256:4f1fb49a840753587de0b15ccd8ae83f655fc8043d0a71a4cbec228365713b0d
|
||||
generated: "2023-06-08T16:30:30.656437+02:00"
|
||||
version: 0.4.0
|
||||
digest: sha256:d4eccd332ada7362f429e04b82022f5605a02e2d3aa7b9fdf8adaf4f6c9e03eb
|
||||
generated: "2023-10-20T10:53:13.982995773+02:00"
|
||||
|
||||
@@ -15,9 +15,9 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.51.0
|
||||
version: 0.58.0
|
||||
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
repository: file://../common
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
dependencies:
|
||||
- name: common
|
||||
repository: file://../common
|
||||
version: 0.3.0
|
||||
digest: sha256:4f1fb49a840753587de0b15ccd8ae83f655fc8043d0a71a4cbec228365713b0d
|
||||
generated: "2023-06-08T16:30:30.052037+02:00"
|
||||
version: 0.4.0
|
||||
digest: sha256:d4eccd332ada7362f429e04b82022f5605a02e2d3aa7b9fdf8adaf4f6c9e03eb
|
||||
generated: "2023-10-20T10:52:47.237955041+02:00"
|
||||
|
||||
@@ -15,9 +15,9 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.51.0
|
||||
version: 0.58.0
|
||||
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
repository: file://../common
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -63,11 +63,15 @@ spec:
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- range $.Values.volumes }}
|
||||
{{if (or (hasPrefix "shared-" .name) (hasPrefix "init-" .name))}}
|
||||
{{- if (or (hasPrefix "shared-" .name) (hasPrefix "init-" .name))}}
|
||||
- mountPath: {{ .path }}
|
||||
name: {{ .name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .securityContext | nindent 12 }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "robustName" .Release.Name }}
|
||||
@@ -87,7 +91,7 @@ spec:
|
||||
- name: http
|
||||
containerPort: {{ .Values.containerPort }}
|
||||
protocol: TCP
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
{{- range .Values.ports }}
|
||||
- name: {{ .name }}
|
||||
containerPort: {{ .containerPort }}
|
||||
@@ -134,7 +138,7 @@ spec:
|
||||
- -c
|
||||
- {{ .Values.sidecar.command | quote }}
|
||||
{{- end }}
|
||||
{{- if or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets }}
|
||||
{{- if or (or (or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName) .Values.existingConfigMaps) .Values.existingSecrets }}
|
||||
envFrom: *envFrom
|
||||
{{- end }}
|
||||
{{- if or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets }}
|
||||
|
||||
@@ -31,7 +31,7 @@ spec:
|
||||
{{- if .Values.nodePort }}
|
||||
nodePort: {{ .Values.nodePort }}
|
||||
{{- end }}
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
{{- range .Values.ports }}
|
||||
- name: {{ .name }}
|
||||
port: {{ if .svcPort }}{{ .svcPort }}{{ else }}{{ .containerPort }}{{ end }}
|
||||
|
||||
@@ -16,5 +16,23 @@ tests:
|
||||
name: release-name
|
||||
- it: Should not reference configmap if vars are not set
|
||||
asserts:
|
||||
- isNull:
|
||||
- isNull:
|
||||
path: spec.template.spec.containers[0].envFrom
|
||||
|
||||
- it: Should reference to existing configmaps
|
||||
set:
|
||||
existingConfigMaps:
|
||||
- name: firstcm
|
||||
optional: true
|
||||
- name: secondcm
|
||||
optional: true
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].envFrom
|
||||
content:
|
||||
configMapRef:
|
||||
name: firstcm
|
||||
optional: true
|
||||
configMapRef:
|
||||
name: secondcm
|
||||
optional: true
|
||||
|
||||
@@ -26,6 +26,13 @@ tests:
|
||||
- equal:
|
||||
path: spec.template.spec.initContainers[0].command
|
||||
value: ['/bin/sh', '-c', 'while true; do date; sleep 2; done && ls /data && printf something']
|
||||
|
||||
|
||||
|
||||
|
||||
- it: Should set security context
|
||||
set:
|
||||
initContainers:
|
||||
- securityContext:
|
||||
runAsNonRoot: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.spec.initContainers[0].securityContext.runAsNonRoot
|
||||
value: true
|
||||
|
||||
@@ -31,3 +31,20 @@ tests:
|
||||
content:
|
||||
secretRef:
|
||||
name: release-name
|
||||
- it: Should reference to existing secrets
|
||||
set:
|
||||
existingSecrets:
|
||||
- name: firstsecret
|
||||
optional: true
|
||||
- name: secondsecret
|
||||
optional: true
|
||||
asserts:
|
||||
- contains:
|
||||
path: spec.template.spec.containers[0].envFrom
|
||||
content:
|
||||
secretRef:
|
||||
name: firstsecret
|
||||
optional: true
|
||||
secretRef:
|
||||
name: secondsecret
|
||||
optional: true
|
||||
|
||||
@@ -14,5 +14,5 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
version: 0.58.0
|
||||
|
||||
|
||||
@@ -5,6 +5,15 @@ metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "staticSite.labels" . | nindent 4 }}
|
||||
{{- if or .Values.gitRepository .Values.gitSha }}
|
||||
annotations:
|
||||
{{- if .Values.gitRepository }}
|
||||
gimlet.io/git-repository: {{ .Values.gitRepository }}
|
||||
{{- end }}
|
||||
{{- if .Values.gitSha }}
|
||||
gimlet.io/git-sha: {{ .Values.gitSha }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
@@ -23,7 +32,9 @@ spec:
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ template "robustName" .Release.Name }}
|
||||
{{- if .Values.serviceAccount }}
|
||||
serviceAccountName: {{ .Values.serviceAccount }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
volumes:
|
||||
|
||||
@@ -2,8 +2,18 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "robustName" .Release.Name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "staticSite.labels" . | nindent 4 }}
|
||||
{{- if or .Values.gitRepository .Values.gitSha }}
|
||||
annotations:
|
||||
{{- if .Values.gitRepository }}
|
||||
gimlet.io/git-repository: {{ .Values.gitRepository }}
|
||||
{{- end }}
|
||||
{{- if .Values.gitSha }}
|
||||
gimlet.io/git-sha: {{ .Values.gitSha }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ template "robustName" .Release.Name }}
|
||||
labels:
|
||||
{{- include "staticSite.labels" . | nindent 4 }}
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -25,21 +25,21 @@
|
||||
"type": "string",
|
||||
"title": "Repo url",
|
||||
"description": "The static site's git repository",
|
||||
"default": "https://github.com/gimlet-io/hugo-site.git"
|
||||
"default": "https://github.com/gimlet-io/reactjs-test-app.git"
|
||||
},
|
||||
"buildImage": {
|
||||
"$id": "#/properties/buildImage",
|
||||
"type": "string",
|
||||
"title": "Build image",
|
||||
"description": "The image that will be used for the build proccess",
|
||||
"default": "bitnami/git:latest"
|
||||
"default": "node:latest"
|
||||
},
|
||||
"buildScript": {
|
||||
"$id": "#/properties/buildScript",
|
||||
"type": "string",
|
||||
"title": "Build script",
|
||||
"description": "Commands required for the build to be completed",
|
||||
"default": "# !/usr/bin/env bash\n# pre -reqs\napt-get update && apt-get install -y wget\n\n# Setting up Hugo \nwget https://github.com/gohugoio/hugo/releases/download/v0.111.3/hugo_0.111.3_Linux-64bit.tar.gz &&\ntar -xzf hugo_0.111.3_Linux-64bit.tar.gz &&\nchmod +x hugo\n\n./hugo"
|
||||
"default": "# !/usr/bin/env bash\n\nnpm install\nnpm run build"
|
||||
|
||||
},
|
||||
"builtAssets": {
|
||||
@@ -47,7 +47,7 @@
|
||||
"type": "string",
|
||||
"title": "Built assets",
|
||||
"description": "The folder containing the build's generated files",
|
||||
"default": "public/"
|
||||
"default": "build/"
|
||||
},
|
||||
"ingress": {
|
||||
"$id": "#/properties/ingress",
|
||||
|
||||
@@ -13,15 +13,6 @@ imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
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: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
@@ -62,17 +53,8 @@ tolerations: []
|
||||
affinity: {}
|
||||
|
||||
# values to build and deploy static sites
|
||||
gitCloneUrl: https://github.com/gimlet-io/hugo-site.git
|
||||
buildImage: bitnami/git:latest # the image must have git installed
|
||||
gitCloneUrl: https://github.com/gimlet-io/reactjs-test-app.git
|
||||
buildImage: "node:latest"
|
||||
buildScript: |
|
||||
# !/usr/bin/env bash
|
||||
# pre -reqs
|
||||
apt-get update && apt-get install -y wget
|
||||
|
||||
# Setting up Hugo
|
||||
wget https://github.com/gohugoio/hugo/releases/download/v0.111.3/hugo_0.111.3_Linux-64bit.tar.gz &&
|
||||
tar -xzf hugo_0.111.3_Linux-64bit.tar.gz &&
|
||||
chmod +x hugo
|
||||
|
||||
./hugo
|
||||
builtAssets: public/
|
||||
npm install && npm run build
|
||||
builtAssets: build/
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+353
-103
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+5
-3
@@ -5,8 +5,6 @@ ingress:
|
||||
gitRepository: github.com/laszlocph/demo-app
|
||||
gitSha: xyz
|
||||
|
||||
vars:
|
||||
MY_VAR: "value"
|
||||
|
||||
volumes:
|
||||
- name: testing
|
||||
@@ -15,4 +13,8 @@ volumes:
|
||||
path: /deleteme
|
||||
- name: empty
|
||||
path: /deleteme2
|
||||
emptyDir: true
|
||||
emptyDir: true
|
||||
|
||||
vars:
|
||||
var1: value1
|
||||
var2: value2
|
||||
|
||||
Reference in New Issue
Block a user