Skip to content

Commit 1d159ff

Browse files
Merge pull request #19 from buttahtoast/fix/rbac
fix: correct rbac for leases
2 parents 5f04267 + cb41c66 commit 1d159ff

File tree

15 files changed

+159
-57
lines changed

15 files changed

+159
-57
lines changed

.github/configs/ct.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
remote: origin
44
target-branch: main
55
chart-dirs:
6-
- helm/
6+
- charts/
77
chart-repos:
88
- buttahtoast=https://buttahtoast.github.io/helm-charts/
99
- bitnami=https://charts.bitnami.com/bitnami

.github/workflows/helm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
registry: ghcr.io
3030
repository: ${{ github.repository_owner }}/charts
3131
name: "svc-ingress-propagator"
32-
path: "./helm"
32+
path: "./charts/svc-ingress-propagator/"
3333
app-version: ${{ steps.extract_version.outputs.version }}
3434
version: ${{ steps.extract_version.outputs.version }}
3535
registry-username: ${{ github.actor }}
File renamed without changes.
File renamed without changes.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# svc-ingress-propagator
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
4+
5+
Ingress Propagation Controller
6+
7+
## Values
8+
9+
| Key | Type | Default | Description |
10+
|-----|------|---------|-------------|
11+
| affinity | object | `{}` | |
12+
| autoscaling.enabled | bool | `false` | |
13+
| autoscaling.maxReplicas | int | `100` | |
14+
| autoscaling.minReplicas | int | `1` | |
15+
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
16+
| fullnameOverride | string | `""` | |
17+
| identifier | string | `""` | instance identifier (Defaults to release name) |
18+
| image.pullPolicy | string | `"IfNotPresent"` | |
19+
| image.registry | string | `"ghcr.io"` | |
20+
| image.repository | string | `"buttahtoast/svc-ingress-propagator"` | |
21+
| image.tag | string | `""` | |
22+
| imagePullSecrets | list | `[]` | |
23+
| ingressClass.controllerValue | string | `""` | Ingress class controller |
24+
| ingressClass.create | bool | `true` | Create IngressClass |
25+
| ingressClass.isDefaultClass | bool | `false` | Cluster default ingress class |
26+
| ingressClass.name | string | `"propagation"` | Ingress class name |
27+
| livenessProbe | object | `{"httpGet":{"path":"/healthz","port":10080}}` | Configure the liveness probe using Deployment probe spec |
28+
| nameOverride | string | `""` | |
29+
| nodeSelector | object | `{}` | |
30+
| podAnnotations | object | `{}` | |
31+
| podSecurityContext | object | `{}` | |
32+
| readinessProbe | object | `{"httpGet":{"path":"/readyz","port":10080}}` | Configure the readiness probe using Deployment probe spec |
33+
| replicaCount | int | `1` | |
34+
| resources | object | `{}` | |
35+
| securityContext | object | `{}` | |
36+
| service.port | int | `80` | |
37+
| service.type | string | `"ClusterIP"` | |
38+
| serviceAccount.annotations | object | `{}` | |
39+
| serviceAccount.create | bool | `true` | |
40+
| serviceAccount.name | string | `""` | |
41+
| target.ingressClass | string | `"propagated"` | IngressClass on target |
42+
| target.issuer.name | string | `""` | Issuer name on target cluster |
43+
| target.issuer.namespaced | bool | `false` | Whether the issuer is namespaced on target cluster |
44+
| target.kubeconfig | object | `{"secret":{"key":"kubeconfig.yaml","name":"loadbalancer-propagation"}}` | Target Kubeconfig Secret |
45+
| target.namespace | string | `"ingress-central"` | Namespaced on target |
46+
| tolerations | list | `[]` | |
47+
48+
----------------------------------------------
49+
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
{{- if .Values.ingressClass.create }}
12
apiVersion: networking.k8s.io/v1
23
kind: IngressClass
34
metadata:
45
annotations:
56
ingressclass.kubernetes.io/is-default-class: {{ .Values.ingressClass.isDefaultClass | quote }}
67
name: {{ .Values.ingressClass.name }}
78
spec:
8-
controller: {{ include "controller.value" $ }}
9+
controller: {{ include "controller.value" $ }}
10+
{{- end }}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
apiVersion: rbac.authorization.k8s.io/v1
3+
kind: ClusterRole
4+
metadata:
5+
name: {{ include "helm.fullname" . }}
6+
labels:
7+
{{- include "helm.labels" . | nindent 4 }}
8+
rules:
9+
- apiGroups:
10+
- ""
11+
resources:
12+
- services
13+
verbs:
14+
- get
15+
- list
16+
- watch
17+
- apiGroups:
18+
- networking.k8s.io
19+
resources:
20+
- ingresses
21+
- ingressclasses
22+
verbs:
23+
- get
24+
- list
25+
- watch
26+
- update
27+
- apiGroups:
28+
- ""
29+
resources:
30+
- events
31+
verbs:
32+
- list
33+
- update
34+
- create
35+
- patch
36+
- apiGroups:
37+
- networking.k8s.io
38+
resources:
39+
- ingresses/status
40+
verbs:
41+
- update
42+
---
43+
apiVersion: rbac.authorization.k8s.io/v1
44+
kind: ClusterRoleBinding
45+
metadata:
46+
name: {{ include "helm.fullname" . }}
47+
labels:
48+
{{- include "helm.labels" . | nindent 4 }}
49+
roleRef:
50+
apiGroup: rbac.authorization.k8s.io
51+
kind: ClusterRole
52+
name: {{ include "helm.fullname" . }}
53+
subjects:
54+
- name: {{ include "helm.serviceAccountName" . }}
55+
kind: ServiceAccount
56+
namespace: {{ .Release.Namespace | quote }}
57+
---
58+
apiVersion: rbac.authorization.k8s.io/v1
59+
kind: Role
60+
metadata:
61+
name: {{ include "helm.fullname" . }}
62+
labels:
63+
{{- include "helm.labels" . | nindent 4 }}
64+
rules:
65+
- apiGroups:
66+
- "coordination.k8s.io"
67+
resources:
68+
- leases
69+
verbs:
70+
- "*"
71+
---
72+
apiVersion: rbac.authorization.k8s.io/v1
73+
kind: RoleBinding
74+
metadata:
75+
name: {{ include "helm.fullname" . }}
76+
labels:
77+
{{- include "helm.labels" . | nindent 4 }}
78+
namespace: {{ .Release.Namespace | quote }}
79+
roleRef:
80+
apiGroup: rbac.authorization.k8s.io
81+
kind: Role
82+
name: {{ include "helm.fullname" . }}
83+
subjects:
84+
- name: {{ include "helm.serviceAccountName" . }}
85+
kind: ServiceAccount
86+
namespace: {{ .Release.Namespace | quote }}

helm/values.yaml renamed to charts/svc-ingress-propagator/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
identifier: ""
77

88
ingressClass:
9+
# -- Create IngressClass
10+
create: true
911
# -- Ingress class name
1012
name: propagation
1113
# -- Ingress class controller

hack/target-rbac/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# propagation-target
2+
3+
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
4+
5+
Resources for target cluster
6+
7+
## Values
8+
9+
| Key | Type | Default | Description |
10+
|-----|------|---------|-------------|
11+
| serviceAccount.annotations | object | `{}` | |
12+
| serviceAccount.create | bool | `true` | |
13+
| serviceAccount.name | string | `""` | |
14+
| serviceAccount.token | bool | `true` | |
15+
16+
----------------------------------------------
17+
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)

helm/templates/clusterrole.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

helm/templates/clusterrolebinding.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)