Compare commits

...

65 Commits

Author SHA1 Message Date
davidfrickert 0e0f29ee43 CronJob - Allow file ConfigMap & disabling command override (#90)
* allow file configmap on cron-job chart

* Allow disabling the command override in cronjob container

* Use name of volume instead of fileName for configmap naming

* Add YAML separator to configmaps to allow multiple configmap volumes

- before this change if you tried to use e.g. multiple file configmaps they would all be appended in one YAML file due to no usage of separators, which would lead to only one of the file confimaps actually be created.

* Fix broken test due to file configmap naming change
2023-11-16 15:39:13 +01:00
Github Action 5f0d40f05f The next release version will be 0.61.0 2023-11-11 20:37:45 +00:00
Github Action 410f2b6047 Publishing 0.60.0 to the Helm repository 2023-11-11 20:37:45 +00:00
Laszlo Fogas 9022b34793 Supporting v1alpha1 opensca.dev release 2023-11-11 21:37:04 +01:00
Github Action 366eca776f The next release version will be 0.60.0 2023-11-09 12:38:32 +00:00
Github Action 365544204c Publishing 0.59.0 to the Helm repository 2023-11-09 12:38:32 +00:00
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
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
Youcef Guichi 97cb75878b Merge pull request #72 from pnieweglowski/master
Add subPath property for secrets (#1)
2023-06-05 13:48:02 +02:00
pnieweglowski 2bbbb208f4 Add subPath property for secrets (#1)
* Add subPath property for secrets
2023-06-02 21:44:09 +02:00
Laszlo Fogas ffeba134d6 License file added 2023-05-27 15:21:32 +02:00
Github Action 4291ffa6ce The next release version will be 0.48.0 2023-04-10 04:27:52 +00:00
Github Action c58141c357 Publishing 0.47.0 to the Helm repository 2023-04-10 04:27:51 +00:00
84 changed files with 1150 additions and 198 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 .
+201
View File
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+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.2.0
version: 0.4.0
+1
View File
@@ -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 }}: |
+12 -2
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 }}
@@ -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) }}
@@ -13,11 +13,17 @@ volumeMounts: &volumeMounts
{{- range .Values.sealedFileSecrets }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- if .subPath}}
subPath: {{ .subPath }}
{{- end }}
readOnly: true
{{- end }}
{{- range .Values.fileSecrets }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- if .subPath}}
subPath: {{ .subPath }}
{{- end }}
readOnly: true
{{- end }}
{{- range .Values.existingFileSecrets }}
+2 -2
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 }}
@@ -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 }}
+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.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.47.0
version: 0.61.0
dependencies:
- name: common
version: 0.2.0
version: 0.4.0
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"
+2
View File
@@ -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 * * * *"
+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",
+1
View File
@@ -5,6 +5,7 @@ image:
schedule: "*/1 * * * *"
command: |
echo "I'm alive"
overrideCommand: true
shell: "/bin/sh"
nameOverride: ""
+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.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.47.0
version: 0.61.0
dependencies:
- name: common
version: 0.2.0
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"
}
}
+17 -5
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 }}
@@ -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 }}
+33 -2
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 }}
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
@@ -18,6 +18,22 @@ tests:
- name: google-account-key
mountPath: /google-account-key
readOnly: true
- it: Should mount volume with optional subPath
set:
fileSecrets:
- name: google-account-key
path: /config/google-account-key
subPath: google-account-key
secrets:
key.json: supersecret
asserts:
- equal:
path: spec.template.spec.containers[0].volumeMounts
value:
- name: google-account-key
mountPath: /config/google-account-key
subPath: google-account-key
readOnly: true
- it: Should reference volume
set:
fileSecrets:
@@ -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
+86
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",
@@ -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",
+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.1.0
version: 0.61.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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+568 -95
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.
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
View File
@@ -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