GitHub invalid resource name = stop processing completely
sterburg opened this issue · 0 comments
When a GitHub Team contains an invalid character, not compliant with Kubernetes naming convention the Operator throws below error, but what is worse is that it stops the whole loop of creating all the Groups. (in my case: in alphabetical order: it stops at "ABC" (error at "CI/CD" group name), and didn't process any Teams starting with "DEFGHIJ....etc".)
It should skip the error and continue processing the list.
1.6801687425687912e+09 ERROR unable to lookup object {"controller": "groupsync", "controllerGroup": "redhatcop.redhat.io", "controllerKind": "GroupSync", "groupSync": {"name":"github","namespace":"openshift-authentication"}, "namespace": "openshift-authentication", "name": "github", "reconcileID": "b714e6e0-ef7e-4d39-a62d-efefc41e4de8", "object": {"apiVersion": "user.openshift.io/v1", "kind": "Group", "name": "CI/CD Contributors"}, "error": "invalid resource name \"CI/CD Contributors\": [may not contain '/']"}
apiVersion: redhatcop.redhat.io/v1alpha1
kind: GroupSync
metadata:
name: github
namespace: openshift-authentication
spec:
schedule: "* * * * *"
providers:
- name: github
github:
credentialsSecret:
key: privateKey
kind: Secret
name: github-groupsync
namespace: openshift-authentication
mapByScimId: false
organization: mycorp