Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

PVC Storage Class Values Overriding #1119

Open
mphammer opened this issue Nov 25, 2019 · 0 comments
Open

PVC Storage Class Values Overriding #1119

mphammer opened this issue Nov 25, 2019 · 0 comments
Assignees
Milestone

Comments

@mphammer
Copy link
Member

What happened:

If you set the global pvc-storage-class flag and configure pvc values with --pvc-file-path, then synopsysctl will not add the storage class to the PVCs that are being overwritten/added from the file. It just adds the storage class to PVCs that are not in the file.

What you expected to happen:

Synopsysctl should add the global pvc storage class to all the pvcs. If the pvc.json explicitly sets a different storage class, then that should be used for just that pvc (the others will still use the global one (or none) ).

How to reproduce it (as minimally and precisely as possible):

Command:
$ ./synopsysctl create blackduck bd --admin-password a --postgres-password p --user-password u --persistent-storage true --pvc-file-path /Users/hammer/go/src/github.com/blackducksoftware/synopsys-operator/examples/synopsysctl/pvc.json --pvc-storage-class "hello" --mock yaml

pvc.json (notice zookeeper is missing):

[
    {
        "name": "blackduck-uploadcache-data",
        "size": "10Gi"
    },
    {
        "name": "blackduck-postgres",
        "size": "10Gi"
    },
    {
        "name": "blackduck-authentication",
        "size": "10Gi"
    },
    {
        "name": "blackduck-cfssl",
        "size": "10Gi"
    },
    {
        "name": "blackduck-registration",
        "size": "10Gi"
    },
    {
        "name": "blackduck-webapp",
        "size": "10Gi"
    },
    {
        "name": "blackduck-logstash",
        "size": "10Gi"
    }
]

Output:

  pvc:
  - name: blackduck-cfssl
    size: 10Gi
  - name: blackduck-registration
    size: 10Gi
  - name: blackduck-webapp
    size: 10Gi
  - name: blackduck-logstash
    size: 10Gi
  - name: blackduck-zookeeper
    size: 4Gi
    storageClass: hello
  - name: blackduck-uploadcache-data
    size: 10Gi
  - name: blackduck-postgres
    size: 10Gi
  - name: blackduck-authentication
    size: 10Gi
  pvcStorageClass: hello
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants