blackducksoftware / synopsys-operator

Archived and moved this to https://github.com/blackducksoftware/synopsysctl
Apache License 2.0
10 stars 14 forks source link

alert fails internally inside the operator the first time #601

Closed yashbhutwala closed 5 years ago

yashbhutwala commented 5 years ago

What happened: Internally, alert creation fails the first time due to namespace not being there in the cr's namespace for crudupdater

How to reproduce it (as minimally and precisely as possible): Have operator running in cluster scope, with alert crd enabled Create Alert, default

Logs:

time="2019-06-27T22:19:53Z" level=info msg="creating Namespace alt2"
time="2019-06-27T22:19:53Z" level=debug msg="patch namespace for synopsys label in namespace ''"
time="2019-06-27T22:19:53Z" level=error msg="unable to ensure the Alert alt2 due to unable to update Alert components due to [unable to update namespace  due to resource name may not be empty\ngithub.com/blackducksoftware/synopsys-operator/pkg/crdupdater/updater.go:76: add/patch components:]"
Name:         alt2
Namespace:
Labels:       <none>
Annotations:  synopsys.com/created.by: 2019.6.0-SNAPSHOT
API Version:  synopsys.com/v1
Kind:         Alert
Metadata:
  Creation Timestamp:  2019-06-27T22:19:53Z
  Generation:          1
  Resource Version:    6149485
  Self Link:           /apis/synopsys.com/v1/alerts/alt2
  UID:                 afab53ed-9929-11e9-acc0-42010a8e013f
Spec:
  Encryption Global Salt:
  Encryption Password:
  Alert Memory:            2560M
  Cfssl Memory:            640M
  Environs:
    ALERT_SERVER_PORT:8443
    PUBLIC_HUB_WEBSERVER_HOST:localhost
    PUBLIC_HUB_WEBSERVER_PORT:443
  Expose Service:      NONE
  Namespace:           alt2
  Persistent Storage:  false
  Port:                8443
  Pvc Name:            alert-pvc
  Pvc Size:            5G
  Pvc Storage Class:
  Stand Alone:         true
  Version:             4.0.0
Status:
  Error Message:
  State:          Running
Events:           <none>
yashbhutwala commented 5 years ago

Same with blackduck and opssight, but with alert status results in an error; for blackduck it does not.