blackducksoftware / synopsys-operator

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

synopsysctl create alert native does not properly mount secrets directory when passing custom certs #1261

Open alexrsbd opened 4 years ago

alexrsbd commented 4 years ago

What happened: Alert did not pick up custom certificates when deployed natively

What you expected to happen: It would pick up the custom certificates that were passed to synopsysctl and use them for the webapp

How to reproduce it (as minimally and precisely as possible): ./synopsysctl create alert native blackduck-alert -n blackduck --environs=HUB_CFSSL_HOST:hub-blackduck-cfssl,ALERT_SERVER_PORT:8443,ALERT_HOSTNAME:localhost --standalone false --encryption-global-salt --encryption-password --persistent-storage=true --pvc-storage-class trident-basic-storage --certificate-file-path /path/to/cert.pem --certificate-key-file-path /path/to/key.pem --format yaml > alert.yaml

Screenshots/additional context: The yaml states this

spec:
      containers:
      - env:
        - name: RUN_SECRETS_DIR
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
#this causes "echo $RUN_SECRETS_DIR" to return pod name and not mount a directory.

I resolved the issue by changing it to this

spec:
      containers:
      - env:
        - name: RUN_SECRETS_DIR
          value: /tmp/secrets

Environment (please complete the following information): synopsysctl version 2019.11.1 and 2019.12.0