Compare commits

...

42 Commits

Author SHA1 Message Date
Laszlo Fogas 3b9b6e30ae Support for Gimlet metadata annotations 2023-08-22 15:16:12 +02:00
Github Action 3a04385235 The next release version will be 0.57.0 2023-08-22 12:47:38 +00:00
Github Action bde9fdfe3f Publishing 0.56.0 to the Helm repository 2023-08-22 12:47:37 +00:00
Laszlo Fogas 5eca12d8e1 Static-site json schema updated to match the default values.yaml 2023-08-22 14:47:01 +02:00
Github Action ea74075201 The next release version will be 0.56.0 2023-08-21 14:59:28 +00:00
Github Action c4f6e01ae5 Publishing 0.55.0 to the Helm repository 2023-08-21 14:59:27 +00:00
Laszlo Fogas 858f5e31e0 Changed default build settings 2023-08-21 16:57:30 +02:00
Laszlo Fogas cb00d364d6 Update values.yaml 2023-08-21 16:55:52 +02:00
Github Action b3b33a4b18 The next release version will be 0.55.0 2023-08-21 14:41:32 +00:00
Github Action a5933c0967 Publishing 0.54.0 to the Helm repository 2023-08-21 14:41:31 +00:00
Laszlo Fogas 52b7f9926b Support for Gimlet metadata annotations 2023-08-21 16:40:59 +02:00
Laszlo Fogas 3fda8ce594 Bugfix: namespace was missing 2023-08-21 16:39:26 +02:00
Laszlo Fogas bcb020a12e We only reference existing service accounts, never create it 2023-08-21 16:38:43 +02:00
Github Action b2b6ac4a06 The next release version will be 0.54.0 2023-08-18 06:42:37 +00:00
Github Action af09d73974 Publishing 0.53.0 to the Helm repository 2023-08-18 06:42:36 +00:00
Laszlo Fogas 5db236e7b2 Removed empty lines 2023-08-18 08:37:47 +02:00
Laszlo Fogas 20455220c5 Revert "Removed emoty lines"
This reverts commit c4b19f2801.
2023-08-17 19:28:47 +02:00
Laszlo Fogas c4b19f2801 Removed emoty lines 2023-08-17 19:24:31 +02:00
Github Action ba5fabf679 The next release version will be 0.53.0 2023-08-14 13:03:52 +00:00
Github Action af56df9c19 Publishing 0.52.0 to the Helm repository 2023-08-14 13:03:51 +00:00
Youcef Guichi d0aa57c456 Add security context to init containers -- Added unit test for it (#76)
* Add security context to init containers -- Added unit test for it

* Minor cleaning

---------

Co-authored-by: Laszlo Fogas <laszlo@gimlet.io>
2023-08-14 15:01:22 +02:00
Laszlo Fogas 7b56a9d7c4 Fixing chart version 2023-08-14 13:39:54 +02:00
Laszlo Fogas 4943dc16c6 Preparing for static-site release 2023-08-14 13:39:19 +02:00
Github Action 3445336501 The next release version will be 0.52.0 2023-08-11 08:59:15 +00:00
Github Action ddf8e253e7 Publishing 0.51.0 to the Helm repository 2023-08-11 08:59:15 +00:00
Ádám Sisák 38e586aa7b Remove build tag in static site (#77)
* Chart schema edit

* Build tag removed
2023-08-11 10:58:05 +02:00
Github Action f0d1bd712a The next release version will be 0.51.0 2023-07-12 13:20:54 +00:00
Github Action fe697ea2d4 Publishing 0.50.0 to the Helm repository 2023-07-12 13:20:54 +00:00
Youcef Guichi aae45103a2 Add ignoreLimits flag to container resources (#74) 2023-07-12 14:55:34 +02:00
Github Action 8c0968d1b5 The next release version will be 0.50.0 2023-06-09 07:00:08 +00:00
Github Action e704f8896c Publishing 0.49.0 to the Helm repository 2023-06-09 07:00:07 +00:00
Youcef Guichi 00bc7eb65f Merge pull request #73 from gimlet-io/add-cronjob-schedule-to-ui
Add schedule field for cronjob to the UI
2023-06-09 08:56:46 +02:00
Youcef Guichi ad1d2118e5 Downgrade common version to 0.3.0 (2) 2023-06-08 16:30:56 +02:00
Youcef Guichi a072b8e39e Downgrade common version to 0.3.0 2023-06-08 16:29:20 +02:00
Youcef Guichi 846e17eb44 Reorder cronjob UI elements 2023-06-08 16:19:00 +02:00
Youcef Guichi 8b62aad4a9 fix white spacing 2023-06-08 16:10:05 +02:00
Youcef Guichi 6f87a0ad69 fix white spacing 2023-06-08 15:59:10 +02:00
Youcef Guichi 4e74387f03 Upgradae dependencies version for onechart 2023-06-08 15:49:58 +02:00
Youcef Guichi 4b4357c6ec Upgrade common chart version to 0.4.0 2023-06-08 15:47:28 +02:00
Youcef Guichi 8fe2bc6933 Add schedule field for cronjob to the UI 2023-06-08 15:44:04 +02:00
Github Action d37592faeb The next release version will be 0.49.0 2023-06-05 11:59:24 +00:00
Github Action 11b5d6f25b Publishing 0.48.0 to the Helm repository 2023-06-05 11:59:23 +00:00
56 changed files with 528 additions and 184 deletions
+1
View File
@@ -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 .
+1 -1
View File
@@ -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.3.1
+2 -2
View File
@@ -1,5 +1,5 @@
{{- define "common.envFromRef.tpl" -}}
{{- if or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName }}
{{- if or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName -}}
envFrom: &envFrom
{{- if .Values.vars }}
- configMapRef:
@@ -18,4 +18,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 -1
View File
@@ -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 }}
+3 -3
View File
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.2.0
digest: sha256:ea028bf07fdc361daabca0c0155e4511cc4fffda94d2f697f4d16013f250c8a8
generated: "2023-02-17T15:14:21.719376584+01:00"
version: 0.3.1
digest: sha256:64689b29ef8b2262efbd5d49bccf40f798698d426dcfdc7c632aaf183a8cc681
generated: "2023-08-18T08:34:24.144108449+02:00"
+2 -2
View File
@@ -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.48.0
version: 0.57.0
dependencies:
- name: common
version: 0.3.0
version: 0.3.1
repository: file://../common
Binary file not shown.
Binary file not shown.
+1
View File
@@ -1,6 +1,7 @@
[
{
"schemaIDs": [
"#/properties/schedule",
"#/properties/image",
"#/properties/shell",
"#/properties/command"
@@ -0,0 +1,11 @@
suite: test cron job
templates:
- cronJob.yaml
tests:
- it: Should set schedule
set:
schedule: "*/1 * * * *"
asserts:
- equal:
path: spec.schedule
value: "*/1 * * * *"
+7
View File
@@ -238,6 +238,13 @@
"description": "The command to run in the cronjob",
"default": "echo \"I'm alive\""
},
"schedule": {
"$id": "#/properties/schedule",
"type": "string",
"title": "Schedule",
"description": "Schedule your cronjob",
"default": "*/1 * * * *"
},
"vars": {
"$id": "#/properties/vars",
"type": "object",
+3 -3
View File
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.2.0
digest: sha256:ea028bf07fdc361daabca0c0155e4511cc4fffda94d2f697f4d16013f250c8a8
generated: "2023-02-17T15:13:57.926786542+01:00"
version: 0.3.1
digest: sha256:64689b29ef8b2262efbd5d49bccf40f798698d426dcfdc7c632aaf183a8cc681
generated: "2023-08-18T08:31:18.469039683+02:00"
+2 -2
View File
@@ -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.48.0
version: 0.57.0
dependencies:
- name: common
version: 0.3.0
version: 0.3.1
repository: file://../common
Binary file not shown.
Binary file not shown.
+13 -4
View File
@@ -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 }}
@@ -117,7 +121,12 @@ spec:
{{- include "common.volumeMountsRef.tpl" . | nindent 10 }}
{{- if not .Values.resources.ignore }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.resources.ignoreLimits }}
requests:
{{- toYaml .Values.resources.requests | nindent 14 }}
{{- else }}
{{- toYaml .Values.resources | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.sidecar }}
- name: {{ template "robustName" .Release.Name }}-sidecar
+1 -1
View File
@@ -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 }}
@@ -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
@@ -15,4 +15,26 @@ tests:
ignore: true
asserts:
- isNull:
path: spec.template.spec.containers[0].resources
path: spec.template.spec.containers[0].resources
- it: Should ignore resources limits when ignoreLimits flag is set
set:
resources:
ignoreLimits: true
asserts:
- isNull:
path: spec.template.spec.containers[0].resources.limits
- isNotNull:
path: spec.template.spec.containers[0].resources.requests
- it: Should create requests when ignoreLimits flag is set
set:
resources:
ignoreLimits: true
requests:
cpu: "1000m"
memory: "200Mi"
asserts:
- isNotNull:
path: spec.template.spec.containers[0].resources.requests
- equal:
path: spec.template.spec.containers[0].resources.requests.cpu
value: 1000m
+10
View File
@@ -283,6 +283,16 @@
true
]
},
"ignoreLimits": {
"$id": "#/properties/resources/properties/ignoreLimits",
"type": "boolean",
"title": "Ignore limits",
"description": "If set to true, limits in resource configuration will be ignored",
"default": false,
"examples": [
true
]
},
"requests": {
"$id": "#/properties/resources/properties/requests",
"type": "object",
+1 -1
View File
@@ -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.57.0
+3 -4
View File
@@ -3,14 +3,13 @@
"schemaIDs": [
"#/properties/gitCloneUrl",
"#/properties/buildImage",
"#/properties/buildTag",
"#/properties/buildScript",
"#/properties/builtAssets"
],
"uiSchema": {
"#/properties/buildScript":{
"ui:widget": "textarea"
"#/properties/buildScript": {
"ui:widget": "textarea",
"ui:rows": 10
}
},
"metaData": {
+13 -2
View File
@@ -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:
@@ -31,7 +42,7 @@ spec:
emptyDir: {}
initContainers:
- name: init-con
image: {{ .Values.buildImage }}:{{ .Values.buildTag }}
image: {{ .Values.buildImage }}
{{- if .Values.buildScript }}
command:
- sh
+10
View File
@@ -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 }}
@@ -5,11 +5,8 @@ tests:
- it: Should set image, tag and command
set:
gitCloneUrl: https:/github.com/mycompany/myrepo.git
buildImage: nginx
buildTag: x.y.z
buildImage: nginx:x.y.z
asserts:
- equal:
path: spec.template.spec.initContainers[0].image
value: nginx:x.y.z
+5 -14
View File
@@ -8,8 +8,7 @@
"examples": [
{
"gitCloneUrl": "https://github.com/gimlet-io/hugo-site.git",
"buildImage": "node",
"buildTag": "latest",
"buildImage": "node:latest",
"buildScript": "npm install && npm install -g gatsby-cli && gatsby build",
"builtAssets": "public/"
}
@@ -17,7 +16,6 @@
"required": [
"gitCloneUrl",
"buildImage",
"buildTag",
"buildScript",
"builtAssets"
],
@@ -27,27 +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"
},
"buildTag": {
"$id": "#/properties/buildTag",
"type": "string",
"title": "Image tag",
"default": "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": {
@@ -55,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",
@@ -119,7 +111,6 @@
}
}
}
},
"additionalProperties": true
}
+4 -23
View File
@@ -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,18 +53,8 @@ tolerations: []
affinity: {}
# values to build and deploy static sites
gitCloneUrl: https://github.com/gimlet-io/hugo-site.git
buildImage: bitnami/git # the image must have git installed
buildTag: latest
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.
Binary file not shown.
Binary file not shown.
+394 -97
View File
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.
Binary file not shown.
+5 -3
View File
@@ -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