Skip to content
Discussion options

You must be logged in to vote

Yes, this is a known gap in the kube play secret handling. The code that converts Kubernetes Secret manifests to Podman secrets (pkg/domain/infra/abi/play.go, playKubeSecret function) creates the secret using secrets.CreateSecretOpts and only passes Name, Driver, and the secret data. The metadata.labels from the YAML are parsed but never mapped to Spec.Labels.

For reference, the secret creation call looks roughly like:

secretID, err := ic.Libpod.Secrets().Create(
    secretName,
    secretData,
    secrets.CreateSecretOpts{
        Driver:     driver,
        DriverOpts: driverOpts,
    },
)

There's no Labels field being set from the Kubernetes metadata.

Workaround: create the secret manu…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Shubhamag12
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants