Compare commits

...

66 Commits

Author SHA1 Message Date
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
victorswed 4a217ce3d6 add servicemonitor to onechart (#66)
add service monitor to onechart
2023-04-10 06:25:33 +02:00
Github Action 576204759f The next release version will be 0.47.0 2023-03-30 12:04:57 +00:00
Github Action fff72a0222 Publishing 0.46.0 to the Helm repository 2023-03-30 12:04:56 +00:00
Laszlo Fogas 6d25c17397 Releasing static-site 2023-03-30 14:04:05 +02:00
Github Action 5f96ab341d The next release version will be 0.46.0 2023-03-30 11:57:41 +00:00
Github Action ac8ad047b4 Publishing 0.45.0 to the Helm repository 2023-03-30 11:57:40 +00:00
Laszlo Fogas 00becd0fab added a new chart static-site that build and host static sites. (#64)
Co-authored-by: Youcef Guichi <youcef@gimlet.io>
2023-03-30 13:54:27 +02:00
Ádám Sisák 0b7faf42ac README fixes (#65) 2023-03-30 13:08:24 +02:00
Github Action 6480058dba The next release version will be 0.45.0 2023-03-24 10:18:42 +00:00
Github Action e2d2025c38 Publishing 0.44.0 to the Helm repository 2023-03-24 10:18:41 +00:00
Laszlo Fogas 118cd8e1cb add initcontainers support (#63)
Co-authored-by: Youcef Guichi <youcef@gimlet.io>
2023-03-24 11:16:22 +01:00
Github Action 93892ec341 The next release version will be 0.44.0 2023-03-16 12:43:42 +00:00
Github Action 0a1db3d5cf Publishing 0.43.0 to the Helm repository 2023-03-16 12:43:41 +00:00
84 changed files with 1776 additions and 137 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.
+12
View File
@@ -7,6 +7,7 @@ lint:
helm lint charts/onechart/
helm lint charts/cron-job/
helm lint charts/namespaces/
helm lint charts/static-site
kubeval:
rm -rf manifests && true
@@ -27,6 +28,12 @@ kubeval:
find manifests/ -name '*.yaml' | xargs kubeval --ignore-missing-schemas -v 1.20.0
find manifests/ -name '*.yaml' | xargs kubeval --ignore-missing-schemas -v 1.24.0
rm -rf manifests && true
mkdir manifests
helm template charts/static-site --output-dir manifests
find manifests/ -name '*.yaml' | xargs kubeval --ignore-missing-schemas -v 1.20.0
find manifests/ -name '*.yaml' | xargs kubeval --ignore-missing-schemas -v 1.24.0
test:
helm dependency update charts/onechart
helm unittest charts/onechart
@@ -36,6 +43,8 @@ test:
helm unittest charts/namespaces
helm unittest charts/static-site
package:
helm dependency update charts/onechart
helm package charts/onechart
@@ -48,6 +57,9 @@ package:
helm package charts/namespaces
mv namespaces*.tgz docs
helm package charts/static-site
mv static-site*.tgz docs
helm repo index docs --url https://chart.onechart.dev
debug:
+2 -2
View File
@@ -4,7 +4,7 @@ A generic Helm chart for your application deployments.
Because no-one can remember the Kubernetes yaml syntax.
https://gimlet.io/docs
https://gimlet.io/docs/onechart-reference
## Getting started
@@ -30,7 +30,7 @@ helm install my-release onechart/onechart \
--set image.tag=1.19.3
```
See all [Examples](/examples/deploying-an-image)
See all [Examples](/website/docs/examples/)
## Contribution Guidelines
+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
+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 }}
+10 -11
View File
@@ -1,30 +1,29 @@
{{- 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 }}
{{- $volumeName := .name -}}
{{- if .existingConfigMap }}
{{- $volumeName = .existingConfigMap -}}
{{- end }}
{{- if .fileName }}
{{- $volumeName = include "common.robustName" .fileName -}}
{{- end }}
- name: {{ $volumeName }}
{{- if not (hasPrefix "init-" .name) }}
- name: {{ .name }}
mountPath: {{ .path }}
{{- if .subPath }}
subPath: {{ .subPath }}
{{- end }}
{{- end }}
{{- end }}
{{- 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 }}
+3 -12
View File
@@ -1,17 +1,8 @@
{{- 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 }}
{{- $volumeName := .name -}}
{{- if .existingConfigMap }}
{{- $volumeName = .existingConfigMap -}}
{{- end }}
{{- if .fileName }}
{{- $volumeName = include "common.robustName" .fileName -}}
{{- end }}
- name: {{ $volumeName }}
- name: {{ .name }}
{{- if .emptyDir }}
emptyDir: {}
{{- else if .existingConfigMap }}
@@ -19,7 +10,7 @@ volumes:
name: {{ .existingConfigMap }}
{{- else if .fileName }}
configMap:
name: {{ $volumeName }}
name: {{ template "common.robustName" .fileName }}
{{- 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.43.0
version: 0.58.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"
@@ -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.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.43.0
version: 0.58.0
dependencies:
- name: common
version: 0.2.0
version: 0.4.0
repository: file://../common
Binary file not shown.
Binary file not shown.
+31 -3
View File
@@ -50,6 +50,29 @@ spec:
{{- if .Values.serviceAccount }}
serviceAccountName: {{ .Values.serviceAccount }}
{{- end }}
initContainers:
{{- range .Values.initContainers }}
- name: {{ .name }}
image: "{{ .image }}:{{ .tag }}"
imagePullPolicy: {{ .imagePullPolicy | default "IfNotPresent" }}
{{- if .command }}
command:
- {{ $.Values.shell }}
- -c
- {{ .command | quote}}
{{- end }}
volumeMounts:
{{- range $.Values.volumes }}
{{- if (or (hasPrefix "shared-" .name) (hasPrefix "init-" .name))}}
- mountPath: {{ .path }}
name: {{ .name }}
{{- end }}
{{- end }}
{{- if .securityContext }}
securityContext:
{{- toYaml .securityContext | nindent 12 }}
{{- end}}
{{- end }}
containers:
- name: {{ template "robustName" .Release.Name }}
securityContext: &securityContext
@@ -68,7 +91,7 @@ spec:
- name: http
containerPort: {{ .Values.containerPort }}
protocol: TCP
{{ else }}
{{- else }}
{{- range .Values.ports }}
- name: {{ .name }}
containerPort: {{ .containerPort }}
@@ -98,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
@@ -110,7 +138,7 @@ spec:
- -c
- {{ .Values.sidecar.command | quote }}
{{- end }}
{{- if or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets }}
{{- if or (or (or (or (or (.Values.vars) (.Values.secretEnabled)) .Values.sealedSecrets) .Values.secretName) .Values.existingConfigMaps) .Values.existingSecrets }}
envFrom: *envFrom
{{- end }}
{{- if or (or (.Values.volumes) (.Values.sealedFileSecrets)) .Values.fileSecrets }}
+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 }}
@@ -0,0 +1,42 @@
{{ if .Values.monitor.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "robustName" .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "helm-chart.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:
endpoints:
- interval: 60s
params:
format:
- prometheus
path: {{ default "/metrics" .Values.monitor.path }}
{{ if .Values.monitor.portName }}
port: {{ .Values.monitor.portName }}
{{ else if not .Values.ports }}
port: http
{{ else }}
port: {{ index .Values.ports 0 "name" }}
{{ end }}
scheme: {{ default "http" .Values.monitor.scheme }}
{{ if .Values.monitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.monitor.scrapeTimeout }}
{{ end }}
namespaceSelector:
matchNames:
- "{{ .Release.Namespace }}"
selector:
matchLabels:
{{- include "helm-chart.selectorLabels" . | nindent 6 }}
{{ 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:
@@ -0,0 +1,38 @@
suite: test deployment
templates:
- deployment.yaml
- configmap.yaml
tests:
- it: Should set name, image and tag
set:
initContainers:
- name: pod1
image: nginx
tag: 1.2.2
asserts:
- equal:
path: spec.template.spec.initContainers[0].name
value: pod1
- equal:
path: spec.template.spec.initContainers[0].image
value: "nginx:1.2.2"
- it: Should set command
set:
initContainers:
- command: "while true; do date; sleep 2; done &&
ls /data &&
printf something"
asserts:
- 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
@@ -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
@@ -137,25 +137,27 @@ tests:
set:
volumes:
- existingConfigMap: my-configmap
name: volume-name
path: /randomPath/app.conf
subPath: app.conf
asserts:
- equal:
path: spec.template.spec.volumes
value:
- name: my-configmap
- name: volume-name
configMap:
name: my-configmap
- equal:
path: spec.template.spec.containers[0].volumeMounts
value:
- name: my-configmap
- name: volume-name
mountPath: /randomPath/app.conf
subPath: app.conf
- it: Should use a configmap with custom value
set:
volumes:
- fileName: myfile.conf
- name: volume-name
fileName: myfile.conf
fileContent: |
blablabla
bla
@@ -165,12 +167,55 @@ tests:
- equal:
path: spec.template.spec.volumes
value:
- name: myfile-conf
- name: volume-name
configMap:
name: myfile-conf
- equal:
path: spec.template.spec.containers[0].volumeMounts
value:
- name: myfile-conf
- name: volume-name
mountPath: /randomPath/myfile.conf
subPath: myfile.conf
- it: Should mount a volume only for the init container
set:
initContainers:
- name : pod
volumes:
- name: init-volume
path: /data
emptyDir: true
asserts:
- equal:
path: spec.template.spec.volumes
value:
- name: init-volume
emptyDir: {}
- equal:
path: spec.template.spec.initContainers[0].volumeMounts
value:
- name: init-volume
mountPath: /data
- notEqual:
path: spec.template.spec.containers[0].volumeMounts
value:
- name: init-volume
emptyDir: {}
- it: Should mount a shared volume between the main container and the init container
set:
initContainers:
- name: pod
volumes:
- name: shared-volume
path: /data
emptyDir: true
asserts:
- equal:
path: spec.template.spec.initContainers[0].volumeMounts
value:
- name: shared-volume
mountPath: /data
- equal:
path: spec.template.spec.containers[0].volumeMounts
value:
- name: shared-volume
mountPath: /data
+57
View File
@@ -84,6 +84,53 @@
}
}
},
"initContainers": {
"$id": "#/properties/initcontainers",
"type": "array",
"title": "Init Containers",
"default": [],
"additionalItems": true,
"items": {
"$id": "#/properties/initcontainers/items",
"type": "object",
"anyOf": [
{
"id": "#/properties/volumes/oneOf/0",
"title": "InitContainer",
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "The name of the init container"
},
"image": {
"type": "string",
"title": "Image"
},
"tag": {
"type": "string",
"title": "Tag"
},
"imagePullPolicy": {
"type": "string",
"title": "Command",
"default": "IfNotPresent"
},
"command": {
"type": "string",
"title": "Command"
}
},
"required": [
"name",
"image",
"tag"
]
}
]
}
},
"replicas": {
"$id": "#/properties/replicas",
"type": "integer",
@@ -236,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",
+4
View File
@@ -69,3 +69,7 @@ podDisruptionBudgetEnabled: true
spreadAcrossNodes: false
nodePortEnabled: false
# Set true to enable service monitor.
monitor:
enabled: false
+23
View File
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
+18
View File
@@ -0,0 +1,18 @@
apiVersion: v2
name: static-site
description: Chart to build and deploy static sites
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
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.58.0
+30
View File
@@ -0,0 +1,30 @@
[
{
"schemaIDs": [
"#/properties/gitCloneUrl",
"#/properties/buildImage",
"#/properties/buildScript",
"#/properties/builtAssets"
],
"uiSchema": {
"#/properties/buildScript": {
"ui:widget": "textarea",
"ui:rows": 10
}
},
"metaData": {
"name": "Build",
"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"
}
},
{
"schemaIDs": [
"#/properties/ingress"
],
"uiSchema": {},
"metaData": {
"name": "Ingress",
"icon": "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"
}
}
]
+1
View File
@@ -0,0 +1 @@
+71
View File
@@ -0,0 +1,71 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "staticSite.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "staticSite.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "staticSite.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "staticSite.labels" -}}
helm.sh/chart: {{ include "staticSite.chart" . }}
{{ include "staticSite.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "staticSite.selectorLabels" -}}
app.kubernetes.io/name: {{ include "staticSite.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/*
Create the name of the service account to use
*/}}
{{- define "staticSite.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "staticSite.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
{{/*
Create robustName that can be used as Kubernetes resource name, and as subdomain as well
\w Latin letters, digits, underscore '_' .
\W all but \w .
*/}}
{{- define "robustName" -}}
{{ regexReplaceAll "\\W+" . "-" | replace "_" "-" | lower | trunc 63 | trimSuffix "-" }}
{{- end }}
@@ -0,0 +1,72 @@
apiVersion: apps/v1
kind: Deployment
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:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "staticSite.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "staticSite.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.serviceAccount }}
serviceAccountName: {{ .Values.serviceAccount }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
volumes:
- name: static-files
emptyDir: {}
initContainers:
- name: init-con
image: {{ .Values.buildImage }}
{{- if .Values.buildScript }}
command:
- sh
- -c
- |
git clone {{ .Values.gitCloneUrl}} &&
cd {{ regexFind "([^\\/]+$)" .Values.gitCloneUrl | replace ".git" "" }} &&
{{ .Values.buildScript | nindent 12}}
mkdir -p /usr/share/nginx/html &&
cp -r ./{{ .Values.builtAssets }}. /usr/share/nginx/html
{{- end }}
volumeMounts:
- name: static-files
mountPath: /usr/share/nginx/html
containers:
- name: {{ template "robustName" .Release.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
volumeMounts:
- name: static-files
mountPath: /usr/share/nginx/html
ports:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
+52
View File
@@ -0,0 +1,52 @@
{{/* OneChart ingress snippet */}}
{{- define "onechart.ingress" }}
{{- $robustName := include "robustName" .root.Release.Name -}}
{{- $resourceName := $robustName -}}
{{- if .longName }}
{{- $resourceName = printf "%s-%s" $robustName (include "robustName" .ingress.host) -}}
{{- end }}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $resourceName }}
namespace: {{ .root.Release.Namespace }}
labels:
{{- include "staticSite.labels" .root | nindent 4 }}
{{- if or (or .root.Values.gitSha .ingress.annotations) .root.Values.gitRepository }}
annotations:
{{- if .ingress.annotations }}
{{- toYaml .ingress.annotations | nindent 4 }}
{{- end }}
{{- end }}
spec:
{{- if .ingress.ingressClassName }}
ingressClassName: {{ .ingress.ingressClassName }}
{{- end }}
{{- if default false .ingress.tlsEnabled }}
tls:
- hosts:
- {{ .ingress.host | quote }}
secretName: {{ printf "tls-%s" $resourceName }}
{{- end }}
rules:
- host: {{ .ingress.host | quote }}
http:
paths:
- path: {{ .ingress.path | default "/" | quote }}
pathType: "Prefix"
backend:
service:
name: {{ $robustName }}
port:
number: {{ .root.Values.service.port }}
{{- end }}
{{- with .Values.ingress }}
{{- template "onechart.ingress" (dict "root" $ "ingress" .) }}
{{- end }}
{{- range .Values.ingresses }}
{{template "onechart.ingress" (dict "root" $ "ingress" . "longName" true) }}
{{- end }}
+25
View File
@@ -0,0 +1,25 @@
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:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
selector:
{{- include "staticSite.selectorLabels" . | nindent 4 }}
@@ -0,0 +1,12 @@
suite: test deployment
templates:
- deployment.yaml
tests:
- it: Should set image, tag and command
set:
gitCloneUrl: https:/github.com/mycompany/myrepo.git
buildImage: nginx:x.y.z
asserts:
- equal:
path: spec.template.spec.initContainers[0].image
value: nginx:x.y.z
@@ -0,0 +1,120 @@
suite: test deployment
templates:
- ingress.yaml
tests:
- it: Should set Ingress host name
set:
ingress:
host: chart-example.local
tlsEnabled: true
asserts:
- equal:
path: spec.tls
value:
- hosts:
- chart-example.local
secretName: tls-release-name
- equal:
path: spec.rules
value:
- host: chart-example.local
http:
paths:
- path: "/"
pathType: "Prefix"
backend:
service:
name: release-name
port:
number: 80
- it: Should pass ingress host name as is, user must sanitize it
set:
ingress:
host: feature/my_branch.local
tlsEnabled: true
asserts:
- equal:
path: spec.tls
value:
- hosts:
- feature/my_branch.local
secretName: tls-release-name
- equal:
path: spec.rules
value:
- host: feature/my_branch.local
http:
paths:
- path: "/"
pathType: "Prefix"
backend:
service:
name: release-name
port:
number: 80
- it: Should set Ingress annotation
set:
ingress:
host: chart-example.local
annotations:
just/a-random: annotation
asserts:
- equal:
path: metadata.annotations
value:
just/a-random: annotation
- it: Should set ingress class
set:
ingress:
host: chart-example.local
ingressClassName: nginx
asserts:
- equal:
path: spec.ingressClassName
value: nginx
- it: Should generate multiple ingresses
set:
ingresses:
- host: chart-example.local
annotations:
kubernetes.io/ingress.class: nginx
- host: another.local
annotations:
kubernetes.io/ingress.class: nginx
asserts:
- hasDocuments:
count: 2
- it: Should generate multiple ingresses
set:
ingress:
host: chart-example.local
annotations:
kubernetes.io/ingress.class: nginx
ingresses:
- host: chart-example.local
annotations:
kubernetes.io/ingress.class: nginx
- host: another.local
annotations:
kubernetes.io/ingress.class: nginx
asserts:
- hasDocuments:
count: 3
- it: Should have unique TLS secret names
set:
ingresses:
- host: chart-example.local
tlsEnabled: true
annotations:
kubernetes.io/ingress.class: nginx
- host: another.local
tlsEnabled: true
annotations:
kubernetes.io/ingress.class: nginx
asserts:
- equal:
path: spec.tls
value:
- hosts:
- chart-example.local
secretName: tls-release-name-chart-example-local
@@ -0,0 +1,21 @@
suite: test ingress
templates:
- ingress.yaml
tests:
- it: Should default
set:
ingress:
host: chart-example.local
asserts:
- equal:
path: spec.rules[0].http.paths[0].path
value: "/"
- it: Should use path
set:
ingress:
host: chart-example.local
path: "/mypath"
asserts:
- equal:
path: spec.rules[0].http.paths[0].path
value: "/mypath"
@@ -0,0 +1,12 @@
suite: test deployment
templates:
- ingress.yaml
tests:
- it: Should use service port
set:
ingress:
host: chart-example.local
asserts:
- equal:
path: spec.rules[0].http.paths[0].backend.service.port.number
value: 1234
+116
View File
@@ -0,0 +1,116 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://example.com/example.json",
"type": "object",
"title": "The root schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"examples": [
{
"gitCloneUrl": "https://github.com/gimlet-io/hugo-site.git",
"buildImage": "node:latest",
"buildScript": "npm install && npm install -g gatsby-cli && gatsby build",
"builtAssets": "public/"
}
],
"required": [
"gitCloneUrl",
"buildImage",
"buildScript",
"builtAssets"
],
"properties": {
"gitCloneUrl": {
"$id": "#/properties/gitCloneUrl",
"type": "string",
"title": "Repo url",
"description": "The static site's git repository",
"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": "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\nnpm install\nnpm run build"
},
"builtAssets": {
"$id": "#/properties/builtAssets",
"type": "string",
"title": "Built assets",
"description": "The folder containing the build's generated files",
"default": "build/"
},
"ingress": {
"$id": "#/properties/ingress",
"type": "object",
"title": "Incoming traffic",
"description": "",
"default": {},
"examples": [
{
"tlsEnabled": false,
"annotations": {
"kubernetes.io/ingress.class": "nginx"
},
"host": "my-release.mycompany.com"
}
],
"required": [],
"properties": {
"host": {
"$id": "#/properties/ingress/properties/host",
"type": "string",
"title": "Host Name",
"description": "Where your application will be accessible",
"default": "",
"examples": [
"my-release.mycompany.com"
]
},
"path": {
"$id": "#/properties/ingress/properties/ingressPath",
"type": "string",
"title": "Path",
"description": "The API path where your service is accessible",
"default": "/",
"examples": [
"/api/myservice"
]
},
"tlsEnabled": {
"$id": "#/properties/ingress/properties/tlsEnabled",
"type": "boolean",
"title": "HTTPS",
"description": "",
"default": false,
"examples": [
false
]
},
"annotations": {
"$id": "#/properties/ingress/properties/annotations",
"type": "object",
"title": "Annotations",
"description": "Annotations are used to control ingress behavior. See the full list for the Ingress Nginx project at https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/. Use the `cert-manager.io/cluster-issuer:\"letsencrypt\"` one to request TLS certificates, `kubernetes.io/ingress.class: \"nginx\"` to select an ingress controller.",
"default": {},
"examples": [
{
"kubernetes.io/ingress.class": "nginx"
}
],
"additionalProperties": true
}
}
}
},
"additionalProperties": true
}
+60
View File
@@ -0,0 +1,60 @@
# Default values for static-site.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: nginx
tag: latest
pullPolicy: IfNotPresent
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext:
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
runAsUser: 0
service:
type: ClusterIP
port: 80
# ingress:
# host: dummyapp.127.0.0.1.nip.io
# ingressClassName: nginx
# tlsEnabled: false
# annotations:
# cert-manager.io/cluster-issuer: letsencrypt-staging
resources:
requests:
cpu: 200m
memory: 200Mi
limits:
cpu: 200m
memory: 200Mi
nodeSelector: {}
tolerations: []
affinity: {}
# values to build and deploy static sites
gitCloneUrl: https://github.com/gimlet-io/reactjs-test-app.git
buildImage: "node:latest"
buildScript: |
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.
Binary file not shown.
+569 -85
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.
+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