Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hook=PostSync annotation from hook RBAC #168

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions component/hooks.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ local name = 'argocd-hooks';
local role = kube.Role(name) {
metadata+: {
namespace: params.namespace,
annotations+: {
'argocd.argoproj.io/hook': 'PostSync',
},
},
rules: [
{
Expand All @@ -31,18 +28,12 @@ local role = kube.Role(name) {
local serviceAccount = kube.ServiceAccount(name) {
metadata+: {
namespace: params.namespace,
annotations+: {
'argocd.argoproj.io/hook': 'PostSync',
},
},
};

local roleBinding = kube.RoleBinding(name) {
metadata+: {
namespace: params.namespace,
annotations+: {
'argocd.argoproj.io/hook': 'PostSync',
},
},
subjects_: [ serviceAccount ],
roleRef_: role,
Expand Down
9 changes: 3 additions & 6 deletions tests/golden/defaults/argocd/argocd/25_hooks/hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand Down Expand Up @@ -31,8 +30,7 @@ rules:
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand All @@ -41,8 +39,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand Down
9 changes: 3 additions & 6 deletions tests/golden/openshift/argocd/argocd/25_hooks/hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand Down Expand Up @@ -31,8 +30,7 @@ rules:
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand All @@ -41,8 +39,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand Down
9 changes: 3 additions & 6 deletions tests/golden/params/argocd/argocd/25_hooks/hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand Down Expand Up @@ -31,8 +30,7 @@ rules:
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand All @@ -41,8 +39,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand Down
9 changes: 3 additions & 6 deletions tests/golden/prometheus/argocd/argocd/25_hooks/hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand Down Expand Up @@ -31,8 +30,7 @@ rules:
apiVersion: v1
kind: ServiceAccount
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand All @@ -41,8 +39,7 @@ metadata:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
annotations:
argocd.argoproj.io/hook: PostSync
annotations: {}
labels:
name: argocd-hooks
name: argocd-hooks
Expand Down
Loading