Skip to content

Commit

Permalink
Merge pull request #4 from evgkrsk/backport-nx-patches
Browse files Browse the repository at this point in the history
Backport nx patches
  • Loading branch information
evgkrsk authored Apr 15, 2022
2 parents a01710a + 4ac553e commit 6845cfc
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 30 deletions.
6 changes: 6 additions & 0 deletions charts/universal-chart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog
## 3.0.4 - April 15, 2022

* Fix Helm hooks custom annotations
* Fix Service nodePort
* Removed helm hooks annotations for PVC

## 3.0.3 - April 14, 2022

* fix: nindent in securityContext:
Expand Down
2 changes: 1 addition & 1 deletion charts/universal-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
description: Nixys universal Helm chart for deploy your apps to Kubernetes
name: universal-chart
version: 3.0.3
version: 3.0.4
maintainers:
- name: Roman Andreev
email: [email protected]
Expand Down
2 changes: 1 addition & 1 deletion charts/universal-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ The command removes all the Kubernetes components associated with the chart and
| `protocol` | Protocol of the service port | `"TCP"` |
| `port` | Service port number | `` |
| `targetPort` | Service target port number | `` |
| `nodePort` | Service NodePort number | `` |

### Ingresses parameters

Expand All @@ -193,7 +194,6 @@ The command removes all the Kubernetes components associated with the chart and

### Ingress `paths` object parameters


| Name | Description | Value |
|---------------|-------------------------------------------------------------------------------------------------------------------------|-------|
| `path` | URL path | `"/"` |
Expand Down
4 changes: 2 additions & 2 deletions charts/universal-chart/results/sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ metadata:
app.kubernetes.io/instance: test
app.kubernetes.io/managed-by: Helm
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-weight": "5"
"helm.sh/hook-delete-policy": before-hook-creation
"helm.sh/hook-delete-policy": "before-hook-creation"
key: value
spec:
activeDeadlineSeconds: 120
Expand Down
42 changes: 20 additions & 22 deletions charts/universal-chart/results/web-app.values.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
---
# Source: universal-chart/templates/pvc.yml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: test-app-data
namespace: default
labels:
app.kubernetes.io/name: test
app.kubernetes.io/instance: test
app.kubernetes.io/managed-by: Helm
annotations:
spec:
accessModes:
- ReadWriteOnce
- ReadWriteMany
resources:
requests:
storage: 1Gi
---
# Source: universal-chart/templates/svc.yml
kind: Service
apiVersion: v1
Expand All @@ -17,6 +36,7 @@ spec:
- name: api
protocol: TCP
port: 8080
nodePort: 30036
selector:
app.kubernetes.io/name: test
app.kubernetes.io/instance: test
Expand Down Expand Up @@ -275,25 +295,3 @@ data:
events {
worker_connections 1024;
}
---
# Source: universal-chart/templates/pvc.yml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: test-app-data
namespace: default
labels:
app.kubernetes.io/name: test
app.kubernetes.io/instance: test
app.kubernetes.io/managed-by: Helm
annotations:
helm.sh/hook: "pre-install,pre-upgrade"
helm.sh/hook-weight: "-999"
helm.sh/hook-delete-policy: before-hook-creation
spec:
accessModes:
- ReadWriteOnce
- ReadWriteMany
resources:
requests:
storage: 1Gi
1 change: 1 addition & 0 deletions charts/universal-chart/samples/web-app.values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ services:
- name: api
protocol: TCP
port: 8080
nodePort: 30036
extraSelectorLabels:
app: my-app

Expand Down
4 changes: 2 additions & 2 deletions charts/universal-chart/templates/helm-hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ metadata:
{{- with $general.labels }}{{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 4 }}{{- end }}
{{- with .labels }}{{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 4 }}{{- end }}
annotations:
"helm.sh/hook": {{ .kind | default "pre-install,pre-upgrade" }}
"helm.sh/hook": {{ .kind | default "pre-install,pre-upgrade" | quote }}
"helm.sh/hook-weight": {{ .weight | default "5" | quote }}
"helm.sh/hook-delete-policy": {{ .deletePolicy | default "before-hook-creation" }}
"helm.sh/hook-delete-policy": {{ .deletePolicy | default "before-hook-creation" | quote }}
{{- include "helpers.app.genericAnnotations" $ | indent 4 }}
{{- with $general.annotations }}{{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 4 }}{{- end }}
{{- with .annotations }}{{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 4 }}{{- end }}
Expand Down
1 change: 0 additions & 1 deletion charts/universal-chart/templates/pvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ metadata:
{{- include "helpers.app.labels" $ | nindent 4 }}
{{- with .labels }}{{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 4 }}{{- end }}
annotations:
{{- include "helpers.app.hooksAnnotations" $ | nindent 4 }}
{{- with .annotations }}{{- include "helpers.tplvalues.render" (dict "value" . "context" $) | nindent 4 }}{{- end }}
spec:
accessModes: {{- include "helpers.tplvalues.render" ( dict "value" .accessModes "context" $ ) | nindent 4 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/universal-chart/templates/svc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
{{- if not (empty .targetPort) }}
targetPort: {{ .targetPort }}
{{- end }}
{{- if not (empty .nodePort) }}
nodePort: {{ .nodePort }}
{{- end }}
{{- end }}
selector:
{{- include "helpers.app.selectorLabels" $ | nindent 4 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/universal-chart/testit.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -eux
#!/bin/sh -eu
dname=$(dirname $0)
tests="$dname/tests"
rm -rf --one-file-system $tests
Expand Down

0 comments on commit 6845cfc

Please sign in to comment.