Skip to content

Commit

Permalink
Break workflow role into one yaml file per object for yamllint
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Keay committed Sep 11, 2024
1 parent 99ceecb commit 0598ca3
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 19 deletions.
1 change: 1 addition & 0 deletions .github/workflows/yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
workflows/argo-events/sensors/*.y*ml
workflows/argo-events/eventsources/*.y*ml
workflows/argo-events/roles/*.y*ml
workflows/argo-events/rolebindings/*.y*ml
workflows/argo-events/workflowtemplates/*.y*ml
workflows/openstack/*.y*ml
Expand Down
2 changes: 1 addition & 1 deletion apps/appsets/workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
path: 'workflows/argo-events'
directory:
recurse: true
include: '{roles/*.yaml,secrets/*.yaml,sensors/*yaml,eventsources/*.yaml,workflowtemplates/*.yaml}'
include: '{roles/*.yaml,rolebindings/*.yaml,secrets/*.yaml,sensors/*yaml,eventsources/*.yaml,workflowtemplates/*.yaml}'
- repoURL: '{{index .metadata.annotations "uc_deploy_git_url"}}'
targetRevision: '{{index .metadata.annotations "uc_deploy_ref"}}'
path: 'argo-workflows'
Expand Down
1 change: 1 addition & 0 deletions workflows/argo-events/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ resources:
- sensors/nb-oob-interface-update.yaml
- eventsources/nautobot-webhook.yaml
- roles/sensor-submit-workflow-role.yaml
- rolebindings/openstack-sensor-submit-workflow.yaml
- workflowtemplates/nautobot-api.yaml
- workflowtemplates/get-device-nautobot.yaml
- workflowtemplates/sync-interfaces-to-nautobot.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: openstack-sensor-submit-workflow
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: sensor-submit-workflow-role
subjects:
- kind: ServiceAccount
name: sensor-submit-workflow
namespace: openstack
13 changes: 0 additions & 13 deletions workflows/argo-events/roles/sensor-submit-workflow-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,3 @@ rules:
- patch
resources:
- workflows
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: openstack-sensor-submit-workflow
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: sensor-submit-workflow-role
subjects:
- kind: ServiceAccount
name: sensor-submit-workflow
namespace: openstack
1 change: 1 addition & 0 deletions workflows/openstack/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ resources:
- eventbus-default.yaml
- openstack-event-source.yaml
- sensor-keystone-event-project.yaml
- serviceaccount-sensor-submit-workflow.yaml
5 changes: 0 additions & 5 deletions workflows/openstack/sensor-keystone-event-project.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sensor-submit-workflow
---
apiVersion: argoproj.io/v1alpha1
kind: Sensor
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sensor-submit-workflow

0 comments on commit 0598ca3

Please sign in to comment.