Skip to content

Commit ffaa207

Browse files
author
Tiago Seabra
committed
feat: release changes for version 0.4.11
1 parent 6c61b4d commit ffaa207

File tree

7 files changed

+127
-5
lines changed

7 files changed

+127
-5
lines changed

deploy/helm/galaxy/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ Rely Galaxy Framework Helm chart for Kubernetes
99
| Key | Type | Default | Description |
1010
|-----|------|---------|-------------|
1111
| affinity | object | `{}` | Affinity settings for pod assignment |
12+
| clusterRole.annotations | object | `{}` | |
13+
| clusterRole.apiGroups[0] | string | `"'*'"` | |
14+
| clusterRole.name | string | `""` | |
15+
| clusterRole.resources[0] | string | `"'*'"` | |
16+
| clusterRoleBinding.annotations | object | `{}` | |
17+
| clusterRoleBinding.name | string | `""` | |
1218
| env | object | `{"RELY_API_TOKEN":null,"RELY_INTEGRATION_ID":null}` | Environment variables to be set in the container if not using external secrets |
1319
| env.RELY_API_TOKEN | string | `nil` | The API token for the Rely API |
1420
| env.RELY_INTEGRATION_ID | string | `nil` | The identifier of this integration instance |
@@ -26,7 +32,7 @@ Rely Galaxy Framework Helm chart for Kubernetes
2632
| integration.apiUrl | string | `"https://magneto.rely.io/"` | The url for the Rely API |
2733
| integration.daemonInterval | int | `60` | The interval in minutes at which the integration should run only required if the execution type is daemon |
2834
| integration.executionType | string | `"cronjob"` | The execution type of the integration can be either cronjob or daemon |
29-
| integration.type | string | `nil` | The type of the integration can be any of the following: pagerduty, github, gitlab, bitbucket, sonarqube, aws, opsgenie, gcp |
35+
| integration.type | string | `nil` | The type of the integration can be any of the following: pagerduty, github, gitlab, bitbucket, sonarqube, aws, opsgenie, gcp, flux |
3036
| nameOverride | string | `""` | Override the name of the chart |
3137
| nodeSelector | object | `{}` | Node labels for pod assignment |
3238
| podAnnotations | object | `{}` | The annotations to add to the pod |
@@ -37,8 +43,7 @@ Rely Galaxy Framework Helm chart for Kubernetes
3743
| securityContext | object | `{}` | The security context for the container |
3844
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
3945
| serviceAccount.automount | bool | `true` | Automatically mount a ServiceAccount's API credentials? |
40-
| serviceAccount.create | bool | `false` | Specifies whether a service account should be created |
41-
| serviceAccount.name | string | `""` | The name of the service account to use. -- If not set and create is true, a name is generated using the fullname template |
46+
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
4247
| tolerations | list | `[]` | Toleration labels for pod assignment |
4348
| volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. |
4449
| volumes | list | `[]` | Additional volumes on the output Deployment definition. |

deploy/helm/galaxy/templates/_helpers.tpl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,20 @@ Create the name of the service account to use
6161
{{- end }}
6262
{{- end }}
6363

64+
{{/*
65+
Create the name of the cluster role to use
66+
*/}}
67+
{{- define "galaxy-helm.clusterRoleName" -}}
68+
{{- default (include "galaxy-helm.fullname" .) .Values.clusterRole.name }}
69+
{{- end }}
70+
71+
{{/*
72+
Create the name of the cluster role binding to use
73+
*/}}
74+
{{- define "galaxy-helm.clusterRoleBindingName" -}}
75+
{{- default (include "galaxy-helm.fullname" .) .Values.clusterRoleBinding.name }}
76+
{{- end }}
77+
6478
{{/*
6579
Create a validation for required values
6680
*/}}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{- if eq .Values.integration.type "flux" }}
2+
{{- range .Values.flux.namespaces }}
3+
---
4+
apiVersion: notification.toolkit.fluxcd.io/v1beta3
5+
kind: Alert
6+
metadata:
7+
name: {{ include "galaxy-helm.fullname" $ }}
8+
namespace: {{ . }}
9+
spec:
10+
providerRef:
11+
name: {{ include "galaxy-helm.fullname" $ }}
12+
eventSources:
13+
- kind: Kustomization
14+
name: '*'
15+
- kind: HelmRelease
16+
name: '*'
17+
{{- end }}
18+
{{- end }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if eq .Values.integration.type "flux" }}
2+
{{- range .Values.flux.namespaces }}
3+
---
4+
apiVersion: notification.toolkit.fluxcd.io/v1beta3
5+
kind: Provider
6+
metadata:
7+
name: {{ include "galaxy-helm.fullname" $ }}
8+
namespace: {{ . }}
9+
spec:
10+
type: generic
11+
address: http://{{ include "galaxy-helm.fullname" $ }}.{{ $.Release.Namespace }}.svc.cluster.local/flux/webhook
12+
{{- end }}
13+
{{- end }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{- $exec_mode := default "cronjob" .Values.integration.executionType }}
2+
{{- if eq $exec_mode "daemon" }}
3+
apiVersion: v1
4+
kind: Service
5+
metadata:
6+
name: {{ include "galaxy-helm.fullname" . }}
7+
labels:
8+
{{- include "galaxy-helm.labels" . | nindent 4 }}
9+
spec:
10+
ports:
11+
- port: 80
12+
protocol: TCP
13+
targetPort: 8000
14+
selector:
15+
{{- include "galaxy-helm.selectorLabels" . | nindent 4 }}
16+
type: ClusterIP
17+
{{- end }}

deploy/helm/galaxy/templates/serviceaccount.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- if .Values.serviceAccount.create -}}
2+
---
23
apiVersion: v1
34
kind: ServiceAccount
45
metadata:
@@ -10,4 +11,47 @@ metadata:
1011
{{- toYaml . | nindent 4 }}
1112
{{- end }}
1213
automountServiceAccountToken: {{ .Values.serviceAccount.automount }}
14+
---
15+
apiVersion: rbac.authorization.k8s.io/v1
16+
kind: ClusterRole
17+
metadata:
18+
{{- with .Values.clusterRole.annotations }}
19+
annotations:
20+
{{- toYaml . | nindent 4 }}
21+
{{- end }}
22+
labels:
23+
{{- include "galaxy-helm.labels" . | nindent 4 }}
24+
name: {{ include "galaxy-helm.clusterRoleName" . }}
25+
rules:
26+
- apiGroups:
27+
{{- range .Values.clusterRole.apiGroups }}
28+
- {{ . }}
29+
{{- end }}
30+
resources:
31+
{{- range .Values.clusterRole.resources }}
32+
- {{ . }}
33+
{{- end }}
34+
verbs:
35+
- "get"
36+
- "watch"
37+
- "list"
38+
---
39+
apiVersion: rbac.authorization.k8s.io/v1
40+
kind: ClusterRoleBinding
41+
metadata:
42+
{{- with .Values.clusterRoleBinding.annotations }}
43+
annotations:
44+
{{- toYaml . | nindent 4 }}
45+
{{- end }}
46+
labels:
47+
{{- include "galaxy-helm.labels" . | nindent 4 }}
48+
name: {{ include "galaxy-helm.clusterRoleBindingName" . }}
49+
roleRef:
50+
apiGroup: rbac.authorization.k8s.io
51+
kind: ClusterRole
52+
name: {{ include "galaxy-helm.clusterRoleName" . }}
53+
subjects:
54+
- kind: ServiceAccount
55+
name: {{ include "galaxy-helm.serviceAccountName" . }}
56+
namespace: {{ .Release.Namespace }}
1357
{{- end }}

deploy/helm/galaxy/values.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ externalSecrets:
3131
# -- The configuration for the integration
3232
integration:
3333
# -- The type of the integration
34-
# can be any of the following: pagerduty, github, gitlab, bitbucket, sonarqube, aws, opsgenie, gcp
34+
# can be any of the following: pagerduty, github, gitlab, bitbucket, sonarqube, aws, opsgenie, gcp, flux
3535
type:
3636
# -- The execution type of the integration
3737
# can be either cronjob or daemon
@@ -66,13 +66,24 @@ fullnameOverride: ""
6666

6767
serviceAccount:
6868
# serviceAccount.create -- Specifies whether a service account should be created
69-
create: false
69+
create: true
7070
# serviceAccount.automount -- Automatically mount a ServiceAccount's API credentials?
7171
automount: true
7272
# serviceAccount.annotations -- Annotations to add to the service account
7373
annotations: {}
7474
# serviceAccount.name -- The name of the service account to use.
7575
# -- If not set and create is true, a name is generated using the fullname template
76+
77+
clusterRole:
78+
annotations: {}
79+
name: ""
80+
apiGroups:
81+
- "'*'"
82+
resources:
83+
- "'*'"
84+
85+
clusterRoleBinding:
86+
annotations: {}
7687
name: ""
7788

7889
# podAnnotations -- The annotations to add to the pod

0 commit comments

Comments
 (0)