Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 906958cbcc | |||
| e4f7bc4b45 | |||
| 0e0f29ee43 | |||
| 5f0d40f05f | |||
| 410f2b6047 | |||
| 9022b34793 | |||
| 366eca776f | |||
| 365544204c | |||
| 9e1c6f7474 | |||
| 84a18e1a01 | |||
| c7da3a4a4f | |||
| d66a75ec36 | |||
| 91667083fc | |||
| 6673e96e94 | |||
| 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 | |||
| 38e586aa7b | |||
| f0d1bd712a | |||
| fe697ea2d4 | |||
| aae45103a2 | |||
| 8c0968d1b5 | |||
| e704f8896c | |||
| 00bc7eb65f | |||
| ad1d2118e5 | |||
| a072b8e39e | |||
| 846e17eb44 | |||
| 8b62aad4a9 | |||
| 6f87a0ad69 | |||
| 4e74387f03 | |||
| 4b4357c6ec | |||
| 8fe2bc6933 | |||
| d37592faeb | |||
| 11b5d6f25b |
@@ -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,5 +1,6 @@
|
||||
{{- define "common.configmap.tpl" -}}
|
||||
{{- if .Values.vars }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{{- define "common.customFileConfigmap.tpl" -}}
|
||||
{{- range .Values.volumes }}
|
||||
{{- if .fileName }}
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "common.robustName" .fileName }}
|
||||
name: {{ template "common.robustName" (printf "%s-%s" $.Release.Name .name) }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
data:
|
||||
{{ .fileName }}: |
|
||||
|
||||
@@ -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 }}
|
||||
@@ -10,7 +10,7 @@ volumes:
|
||||
name: {{ .existingConfigMap }}
|
||||
{{- else if .fileName }}
|
||||
configMap:
|
||||
name: {{ template "common.robustName" .fileName }}
|
||||
name: {{ template "common.robustName" (printf "%s-%s" $.Release.Name .name) }}
|
||||
{{- else if .hostPath }}
|
||||
hostPath:
|
||||
path: {{ .hostPath.path }}
|
||||
|
||||
@@ -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.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.48.0
|
||||
version: 0.62.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,7 @@
|
||||
[
|
||||
{
|
||||
"schemaIDs": [
|
||||
"#/properties/schedule",
|
||||
"#/properties/image",
|
||||
"#/properties/shell",
|
||||
"#/properties/command"
|
||||
|
||||
@@ -25,10 +25,12 @@ spec:
|
||||
{{- if .Values.vars }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- end }}
|
||||
{{- if .Values.overrideCommand }}
|
||||
command:
|
||||
- {{ .Values.shell }}
|
||||
- -c
|
||||
- {{ .Values.command | quote }}
|
||||
{{- end }}
|
||||
{{- include "common.envFromRef.tpl" . | nindent 14 }}
|
||||
{{- include "common.volumeMountsRef.tpl" . | nindent 14 }}
|
||||
resources:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{- include "common.customFileConfigmap.tpl" . -}}
|
||||
@@ -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 * * * *"
|
||||
@@ -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",
|
||||
|
||||
@@ -5,6 +5,7 @@ image:
|
||||
schedule: "*/1 * * * *"
|
||||
command: |
|
||||
echo "I'm alive"
|
||||
overrideCommand: true
|
||||
shell: "/bin/sh"
|
||||
|
||||
nameOverride: ""
|
||||
|
||||
@@ -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.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.48.0
|
||||
version: 0.62.0
|
||||
|
||||
dependencies:
|
||||
- name: common
|
||||
version: 0.3.0
|
||||
version: 0.4.0
|
||||
repository: file://../common
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -142,23 +142,33 @@
|
||||
{
|
||||
"schemaIDs": [
|
||||
"#/properties/podDisruptionBudgetEnabled",
|
||||
"#/properties/spreadAcrossNodes"
|
||||
"#/properties/spreadAcrossNodes",
|
||||
"#/properties/podAnnotations",
|
||||
"#/properties/podLabels"
|
||||
],
|
||||
"uiSchema": {},
|
||||
"metaData": {
|
||||
"name": "High Availability",
|
||||
"name": "Deployment fine-tuning",
|
||||
"icon": "M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"schemaIDs": [
|
||||
"#/properties/podAnnotations",
|
||||
"#/properties/name",
|
||||
"#/properties/description",
|
||||
"#/properties/ownerName",
|
||||
"#/properties/ownerIm",
|
||||
"#/properties/gitSha",
|
||||
"#/properties/gitRepository"
|
||||
"#/properties/gitRepository",
|
||||
"#/properties/documentation",
|
||||
"#/properties/logs",
|
||||
"#/properties/metrics",
|
||||
"#/properties/traces",
|
||||
"#/properties/issues"
|
||||
],
|
||||
"uiSchema": {},
|
||||
"metaData": {
|
||||
"name": "Misc",
|
||||
"name": "Service Catalog",
|
||||
"icon": "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,9 @@ spec:
|
||||
gimlet.io/git-repository: {{ .Values.gitRepository }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- with .Values.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- include "helm-chart.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
@@ -63,11 +66,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 +94,7 @@ spec:
|
||||
- name: http
|
||||
containerPort: {{ .Values.containerPort }}
|
||||
protocol: TCP
|
||||
{{ else }}
|
||||
{{- else }}
|
||||
{{- range .Values.ports }}
|
||||
- name: {{ .name }}
|
||||
containerPort: {{ .containerPort }}
|
||||
@@ -117,7 +124,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
|
||||
@@ -129,7 +141,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 }}
|
||||
|
||||
@@ -5,13 +5,44 @@ metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "helm-chart.labels" . | nindent 4 }}
|
||||
{{- if or .Values.gitRepository .Values.gitSha }}
|
||||
{{- if or (or (or (or (or .Values.gitRepository .Values.gitSha) .Values.serviceName) .Values.serviceDescription) .Values.ownerName) .Values.ownerIm }}
|
||||
annotations:
|
||||
{{- if .Values.gitRepository }}
|
||||
gimlet.io/git-repository: {{ .Values.gitRepository }}
|
||||
{{- $parts := split "/" .Values.gitRepository }}
|
||||
v1alpha1.opensca.dev/vcs.owner: {{ $parts._0 }}
|
||||
v1alpha1.opensca.dev/vcs.name: {{ $parts._1 }}
|
||||
{{- end }}
|
||||
{{- if .Values.gitSha }}
|
||||
gimlet.io/git-sha: {{ .Values.gitSha }}
|
||||
v1alpha1.opensca.dev/version.sha: {{ .Values.gitSha }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceName }}
|
||||
v1alpha1.opensca.dev/name: {{ .Values.serviceName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.serviceDescription }}
|
||||
v1alpha1.opensca.dev/description: {{ .Values.serviceDescription | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.ownerName }}
|
||||
v1alpha1.opensca.dev/owner.name: {{ .Values.ownerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.ownerIm }}
|
||||
v1alpha1.opensca.dev/owner.im: {{ .Values.ownerIm | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.documentation }}
|
||||
v1alpha1.opensca.dev/documentation: {{ .Values.documentation | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.logs }}
|
||||
v1alpha1.opensca.dev/logs: {{ .Values.logs | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics }}
|
||||
v1alpha1.opensca.dev/metrics: {{ .Values.metrics | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.issues }}
|
||||
v1alpha1.opensca.dev/issues: {{ .Values.issues | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.traces }}
|
||||
v1alpha1.opensca.dev/traces: {{ .Values.traces | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
@@ -31,7 +62,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
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
suite: test deployment
|
||||
templates:
|
||||
- deployment.yaml
|
||||
- configmap.yaml
|
||||
tests:
|
||||
- it: Should set custom labels
|
||||
set:
|
||||
podLabels:
|
||||
label1: val1
|
||||
label2: val2
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.template.metadata.labels.label1
|
||||
value: val1
|
||||
- equal:
|
||||
path: spec.template.metadata.labels.label2
|
||||
value: val2
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -169,7 +169,7 @@ tests:
|
||||
value:
|
||||
- name: volume-name
|
||||
configMap:
|
||||
name: myfile-conf
|
||||
name: release-name-volume-name
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].volumeMounts
|
||||
value:
|
||||
|
||||
@@ -4,11 +4,32 @@ templates:
|
||||
tests:
|
||||
- it: Should set Gimlet taxonomy
|
||||
set:
|
||||
gitRepository: github.com/laszlocph/demo-app
|
||||
gitRepository: laszlocph/demo-app
|
||||
gitSha: xyz
|
||||
serviceName: cart-backend
|
||||
serviceDescription: "Backend to manage shopping cart state, written in Go"
|
||||
ownerName: "backend-team"
|
||||
ownerIm: "#backend-team"
|
||||
documentation: https://confluence.mycompany.com/cart-backend
|
||||
logs: https://grafana.mycompany.com/logs
|
||||
metrics: https://grafana.mycompany.com/cart-dashboard
|
||||
issues: https://jira.mycompany.com/cart-backend
|
||||
traces: https://jaeger.mycompany.com/cart-dashboard
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
gimlet.io/git-repository: github.com/laszlocph/demo-app
|
||||
gimlet.io/git-repository: laszlocph/demo-app
|
||||
gimlet.io/git-sha: xyz
|
||||
v1alpha1.opensca.dev/vcs.owner: laszlocph
|
||||
v1alpha1.opensca.dev/vcs.name: demo-app
|
||||
v1alpha1.opensca.dev/version.sha: xyz
|
||||
v1alpha1.opensca.dev/name: cart-backend
|
||||
v1alpha1.opensca.dev/description: "Backend to manage shopping cart state, written in Go"
|
||||
v1alpha1.opensca.dev/owner.name: "backend-team"
|
||||
v1alpha1.opensca.dev/owner.im: "#backend-team"
|
||||
v1alpha1.opensca.dev/documentation: https://confluence.mycompany.com/cart-backend
|
||||
v1alpha1.opensca.dev/logs: https://grafana.mycompany.com/logs
|
||||
v1alpha1.opensca.dev/metrics: https://grafana.mycompany.com/cart-dashboard
|
||||
v1alpha1.opensca.dev/issues: https://jira.mycompany.com/cart-backend
|
||||
v1alpha1.opensca.dev/traces: https://jaeger.mycompany.com/cart-dashboard
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"nameOverride": "",
|
||||
"fullnameOverride": "",
|
||||
"podAnnotations": {},
|
||||
"podLabels": {},
|
||||
"podSecurityContext": {
|
||||
"fsGroup": 999
|
||||
},
|
||||
@@ -189,6 +190,81 @@
|
||||
"required": [],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"podLabels": {
|
||||
"$id": "#/properties/podLabels",
|
||||
"type": "object",
|
||||
"title": "Pod labels",
|
||||
"description": "Labels to place on pods",
|
||||
"default": {},
|
||||
"examples": [
|
||||
{}
|
||||
],
|
||||
"required": [],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"name": {
|
||||
"$id": "#/properties/name",
|
||||
"type": "string",
|
||||
"title": "Service Name",
|
||||
"description": "The service name for unique identification",
|
||||
"default": ""
|
||||
},
|
||||
"description": {
|
||||
"$id": "#/properties/description",
|
||||
"type": "string",
|
||||
"title": "Service Description",
|
||||
"description": "Human readable text description of the service",
|
||||
"default": ""
|
||||
},
|
||||
"ownerName": {
|
||||
"$id": "#/properties/ownerName",
|
||||
"type": "string",
|
||||
"title": "Owner",
|
||||
"description": "The person or team who is responsible for this service",
|
||||
"default": ""
|
||||
},
|
||||
"ownerIm": {
|
||||
"$id": "#/properties/ownerIm",
|
||||
"type": "string",
|
||||
"title": "Owner IM",
|
||||
"description": "Instant messaging channel, or direct message handle of the owner. prefix with # for channels, prefix with @ for direct messages.",
|
||||
"default": ""
|
||||
},
|
||||
"documentation": {
|
||||
"$id": "#/properties/documentation",
|
||||
"type": "string",
|
||||
"title": "Link to Documentation",
|
||||
"description": "Link to documentation. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"logs": {
|
||||
"$id": "#/properties/logs",
|
||||
"type": "string",
|
||||
"title": "Link to Logs",
|
||||
"description": "Link to log aggregation platform. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"metrics": {
|
||||
"$id": "#/properties/metrics",
|
||||
"type": "string",
|
||||
"title": "Link to Metrics",
|
||||
"description": "Link to metrics dashboard. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"issues": {
|
||||
"$id": "#/properties/issues",
|
||||
"type": "string",
|
||||
"title": "Link to Issues",
|
||||
"description": "Link to issue tracker. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"traces": {
|
||||
"$id": "#/properties/traces",
|
||||
"type": "string",
|
||||
"title": "Link to Traces",
|
||||
"description": "Link to application traces. The link's preferred usage is in a href html tag.",
|
||||
"default": ""
|
||||
},
|
||||
"gitSha": {
|
||||
"$id": "#/properties/gitSha",
|
||||
"type": "string",
|
||||
@@ -283,6 +359,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",
|
||||
|
||||
@@ -20,6 +20,8 @@ fullnameOverride: ""
|
||||
|
||||
podAnnotations: {}
|
||||
|
||||
podLabels: {}
|
||||
|
||||
podSecurityContext:
|
||||
fsGroup: 999
|
||||
|
||||
@@ -39,7 +41,6 @@ nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
|
||||
probe:
|
||||
enabled: false
|
||||
path: "/"
|
||||
|
||||
@@ -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.62.0
|
||||
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+579
-97
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.
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.
+6
-4
@@ -2,11 +2,9 @@ ingress:
|
||||
host: chart-example.local
|
||||
ingressClassName: nginx
|
||||
|
||||
gitRepository: github.com/laszlocph/demo-app
|
||||
gitRepository: 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