Compare commits

...

12 Commits

Author SHA1 Message Date
Youcef Guichi 9e1c6f7474 Merge pull request #86 from gimlet-io/minor-changes
Minor changes
2023-11-09 13:26:02 +01:00
Youcef Guichi 84a18e1a01 Minor changes 2023-11-09 13:22:44 +01:00
Raz Amir c7da3a4a4f Add podLabels to onechart (#83)
* Add podLabels to onechart

* add unittest
2023-11-07 13:01:15 +01:00
Laszlo Fogas d66a75ec36 osca.dev fields (#82) 2023-10-30 17:55:07 +01:00
Github Action 91667083fc The next release version will be 0.59.0 2023-10-20 08:57:29 +00:00
Github Action 6673e96e94 Publishing 0.58.0 to the Helm repository 2023-10-20 08:57:28 +00:00
Laszlo Fogas 593756f621 Merge pull request #80 from gimlet-io/new-features
Added ability to refrence an env from an existing configMaps and secrets
2023-10-20 10:55:41 +02:00
Laszlo Fogas 8032acb1b9 Default value for optional; bumping common chart version 2023-10-20 10:54:33 +02:00
Youcef Guichi aafc0bbfab Removed envfrom -- Updated unittest 2023-10-20 10:36:50 +02:00
Youcef Guichi 8720c33db4 Added ability to refrence an env from an existing configMaps and secrets 2023-10-19 11:33:48 +02:00
Github Action 775bd4b50c The next release version will be 0.58.0 2023-08-22 13:16:43 +00:00
Github Action 59f8aee710 Publishing 0.57.0 to the Helm repository 2023-08-22 13:16:42 +00:00
29 changed files with 422 additions and 144 deletions
+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.1
version: 0.4.0
+11 -1
View File
@@ -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 }}
+3 -3
View File
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.3.1
digest: sha256:64689b29ef8b2262efbd5d49bccf40f798698d426dcfdc7c632aaf183a8cc681
generated: "2023-08-18T08:34:24.144108449+02:00"
version: 0.4.0
digest: sha256:d4eccd332ada7362f429e04b82022f5605a02e2d3aa7b9fdf8adaf4f6c9e03eb
generated: "2023-10-20T10:53:13.982995773+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.57.0
version: 0.59.0
dependencies:
- name: common
version: 0.3.1
version: 0.4.0
repository: file://../common
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.3.1
digest: sha256:64689b29ef8b2262efbd5d49bccf40f798698d426dcfdc7c632aaf183a8cc681
generated: "2023-08-18T08:31:18.469039683+02:00"
version: 0.4.0
digest: sha256:d4eccd332ada7362f429e04b82022f5605a02e2d3aa7b9fdf8adaf4f6c9e03eb
generated: "2023-10-20T10:52:47.237955041+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.57.0
version: 0.59.0
dependencies:
- name: common
version: 0.3.1
version: 0.4.0
repository: file://../common
Binary file not shown.
Binary file not shown.
+15 -5
View File
@@ -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"
}
}
+4 -1
View File
@@ -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 }}
@@ -138,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 }}
+32 -1
View File
@@ -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 }}
opensca.dev/v0.1.0/vcs/owner: {{ $parts._0 }}
opensca.dev/v0.1.0/vcs/name: {{ $parts._1 }}
{{- end }}
{{- if .Values.gitSha }}
gimlet.io/git-sha: {{ .Values.gitSha }}
opensca.dev/v0.1.0/version/sha: {{ .Values.gitSha }}
{{- end }}
{{- if .Values.serviceName }}
opensca.dev/v0.1.0/name: {{ .Values.serviceName | quote }}
{{- end }}
{{- if .Values.serviceDescription }}
opensca.dev/v0.1.0/description: {{ .Values.serviceDescription | quote }}
{{- end }}
{{- if .Values.ownerName }}
opensca.dev/v0.1.0/owner/name: {{ .Values.ownerName | quote }}
{{- end }}
{{- if .Values.ownerIm }}
opensca.dev/v0.1.0/owner/im: {{ .Values.ownerIm | quote }}
{{- end }}
{{- if .Values.documentation }}
opensca.dev/v0.1.0/documentation: {{ .Values.documentation | quote }}
{{- end }}
{{- if .Values.logs }}
opensca.dev/v0.1.0/logs: {{ .Values.logs | quote }}
{{- end }}
{{- if .Values.metrics }}
opensca.dev/v0.1.0/metrics: {{ .Values.metrics | quote }}
{{- end }}
{{- if .Values.issues }}
opensca.dev/v0.1.0/issues: {{ .Values.issues | quote }}
{{- end }}
{{- if .Values.traces }}
opensca.dev/v0.1.0/traces: {{ .Values.traces | quote }}
{{- end }}
{{- end }}
spec:
@@ -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
@@ -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
@@ -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
@@ -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
opensca.dev/v0.1.0/vcs/owner: laszlocph
opensca.dev/v0.1.0/vcs/name: demo-app
opensca.dev/v0.1.0/version/sha: xyz
opensca.dev/v0.1.0/name: cart-backend
opensca.dev/v0.1.0/description: "Backend to manage shopping cart state, written in Go"
opensca.dev/v0.1.0/owner/name: "backend-team"
opensca.dev/v0.1.0/owner/im: "#backend-team"
opensca.dev/v0.1.0/documentation: https://confluence.mycompany.com/cart-backend
opensca.dev/v0.1.0/logs: https://grafana.mycompany.com/logs
opensca.dev/v0.1.0/metrics: https://grafana.mycompany.com/cart-dashboard
opensca.dev/v0.1.0/issues: https://jira.mycompany.com/cart-backend
opensca.dev/v0.1.0/traces: https://jaeger.mycompany.com/cart-dashboard
+76
View File
@@ -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",
+2 -1
View File
@@ -20,6 +20,8 @@ fullnameOverride: ""
podAnnotations: {}
podLabels: {}
podSecurityContext:
fsGroup: 999
@@ -39,7 +41,6 @@ nodeSelector: {}
tolerations: []
probe:
enabled: false
path: "/"
+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.57.0
version: 0.59.0
Binary file not shown.
Binary file not shown.
+193 -119
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.
+1 -1
View File
@@ -2,7 +2,7 @@ ingress:
host: chart-example.local
ingressClassName: nginx
gitRepository: github.com/laszlocph/demo-app
gitRepository: laszlocph/demo-app
gitSha: xyz