Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaguilar committed Aug 20, 2024
1 parent c22a3a4 commit 95d15ff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,27 @@ Additional rules can be added when defining a post job to run after a successful

# ADDITIONAL RULES
- apiGroups:
- ""
- batch
resources:
- jobs
verbs:
- '*'
- apiGroups:
- ""
resources:
- serviceaccounts
verbs:
- create
- get
- list
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterrolebindings
verbs:
- create
- get
- list
- apiGroups:
- ""
resources:
Expand Down
4 changes: 2 additions & 2 deletions internal/tfhandler/qworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ MainLoop:
log.Printf("Done handling workflow and received %d resources back from api \t(%s/%s)", totalResourcesReceivedFromAPI, namespace, name)
if i.postJobContainerImage != "" {
if err := i.createPostJob(namespace, name); err != nil {
log.Printf("Error creating post job \t(%s/%s)", namespace, name)
log.Printf("Error creating post job: %s \t(%s/%s)", err, namespace, name)
}
}
}
Expand Down Expand Up @@ -211,7 +211,7 @@ func (i informer) createPostJob(namespace, name string) error {
},
RoleRef: rbacv1.RoleRef{
Kind: "ClusterRole",
Name: "tforc",
Name: "terraform-operator-remote-controller", // TODO Get this from the deployment instead
APIGroup: "rbac.authorization.k8s.io",
},
}
Expand Down

0 comments on commit 95d15ff

Please sign in to comment.