You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sample YAML Script for Creation of Secrets in GCP #655
Hi @vivek725k, can we ask you to fill out the bug template more completely? The details we ask there are critical for helping us understand and resolve your problem.
In particular, can you share with us what error you're seeing?
@Vanditha-V-R it looks like your spec.replicas.topics field should have a list value, not an object value.
i.e.
spec:
replicas:
topics:
- name: dep-pubsubtopic
Also, in the future, can you please send us properly formatted YAML snippets? It makes it very difficult to debug issues when the YAML snippets are not formatted properly. Thank you.
@jcanseco
Please check below code. which we have tried to create secrets.
apiVersion: secretmanager.cnrm.cloud.google.com/v1beta1
kind: SecretManagerSecret
metadata:
name: secrettest # name of the secret
namespace: config-control # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/project-id: blueprints-project # kpt-set: ${project-id}
labels:
replication-type: user-managed # type of replication
spec:
expireTime: 2022-12-30T12:30:00Z # Expiration in date time format
replication:
choose google managed or customer managed encryption
userManaged:
replicas:
- customerManagedEncryption:
kmsKeyRef:
name: kmskeytest # Name of the key used for encryption
# location where secret has to be created
location: us-central1 # kpt-set: ${region}
apiVersion: secretmanager.cnrm.cloud.google.com/v1beta1
kind: SecretManagerSecret
metadata:
name: secrettest # name of the secret
namespace: config-control # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/project-id: blueprints-project # kpt-set: ${project-id}
labels:
replication-type: user-managed # type of replication
spec:
expireTime: 2022-12-30T12:30:00Z # Expiration in date time format
replication:
choose google managed or customer managed encryption
userManaged:
replicas:
- customerManagedEncryption:
kmsKeyRef:
name: kmskeytest # Name of the key used for encryption
# location where secret has to be created
location: us-central1 # kpt-set: ${region}
@Vanditha-V-R Again, please format your entire YAML. It is very difficult to determine what you're actually applying if you give us unformatted YAML.
Also, have you tried kubectl apply-ing your SecretManagerSecret resource directly? The error message you're seeing is coming from Config Sync (KNV2009) -- can you check if using just Config Connector works?
@Vanditha-V-R, I was able to reproduce your issue. The field in question that is causing this error is spec.topics. We're looking into why this is occurring and do not currently have a workaround for you at the moment.
@Vanditha-V-R, I've identified the bug causing this issue and have a fix going through review. Once it's merged, it will be included in next week's release.
@Vanditha-V-R, we released a fix in 1.85.0, please give it a try. I'm going to go ahead and close this issue for now, but if you still run into this issue or have any other issues, please feel free to re-open or file another bug!
Activity
jcanseco commentedon Apr 26, 2022
Hi @vivek725k, can we ask you to fill out the bug template more completely? The details we ask there are critical for helping us understand and resolve your problem.
In particular, can you share with us what error you're seeing?
Vanditha-V-R commentedon Apr 27, 2022
@jcanseco
/g.co/cloud/acm-errorsknv1067 KNV2009: failed to apply Secret ManagerSecret.secretmanager.cnrm.cloud.google.com, 2. topics: expected list, got & {map[name: dep-pubsubtopici]
jcanseco commentedon Apr 27, 2022
@Vanditha-V-R it looks like your
spec.replicas.topicsfield should have a list value, not an object value.i.e.
Also, in the future, can you please send us properly formatted YAML snippets? It makes it very difficult to debug issues when the YAML snippets are not formatted properly. Thank you.
Vanditha-V-R commentedon Apr 28, 2022
@jcanseco
Please check below code. which we have tried to create secrets.
apiVersion: secretmanager.cnrm.cloud.google.com/v1beta1
kind: SecretManagerSecret
metadata:
name: secrettest # name of the secret
namespace: config-control # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/project-id: blueprints-project # kpt-set: ${project-id}
labels:
replication-type: user-managed # type of replication
spec:
expireTime: 2022-12-30T12:30:00Z # Expiration in date time format
replication:
choose google managed or customer managed encryption
rotation:
nextRotationTime: 2022-04-30T12:30:00Z
rotationPeriod: 2592000s
topics:
jcanseco commentedon Apr 28, 2022
Hi @Vanditha-V-R, can you elaborate on what the issue is? For example, what is the error message?
Vanditha-V-R commentedon Apr 29, 2022
@jcanseco
i have updated same error in earlier comment as well. posting again. is this possible to provide YAML template for secret creation in GCP
/g.co/cloud/acm-errorsknv1067 KNV2009: failed to apply Secret ManagerSecret.secretmanager.cnrm.cloud.google.com, 2. topics: expected list, got & {map[name: dep-pubsubtopici]
Vanditha-V-R commentedon Apr 29, 2022
apiVersion: secretmanager.cnrm.cloud.google.com/v1beta1
kind: SecretManagerSecret
metadata:
name: secrettest # name of the secret
namespace: config-control # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/project-id: blueprints-project # kpt-set: ${project-id}
labels:
replication-type: user-managed # type of replication
spec:
expireTime: 2022-12-30T12:30:00Z # Expiration in date time format
replication:
choose google managed or customer managed encryption
rotation:
nextRotationTime: 2022-04-30T12:30:00Z
rotationPeriod: 2592000s
topics:
jcanseco commentedon Apr 29, 2022
Hi @Vanditha-V-R, please format your YAML. We cannot determine what the issue is without proper YAML formatting.
See "YAML snippets" in #623 for example.
Vanditha-V-R commentedon May 2, 2022
apiVersion: secretmanager.cnrm.cloud.google.com/v1beta1
kind: SecretManagerSecret
metadata:
name: prodsecret
namespace: config-control # kpt-set: ${namespace}
annotations:
cnrm.cloud.google.com/project-id: blueprints-project # kpt-set: ${project-id}
labels:
replication-type: user-managed
spec:
expireTime: 2022-12-30T12:30:00Z
replication:
userManaged:
replicas:
- customerManagedEncryption:
kmsKeyRef:
name: todayskeyforsecret
location: us-central1
rotation:
nextRotationTime: 2022-05-29T12:30:00Z
rotationPeriod: 2592000s
topics:
apiVersion: pubsub.cnrm.cloud.google.com/v1beta1
kind: PubSubTopic
metadata:
name: pubsubtopic12
namespace: mig-test-2
annotations:
cnrm.cloud.google.com/project-id: "project-id" # kpt-set: ${project-id}
Vanditha-V-R commentedon May 2, 2022
@jcanseco
formatting is not taking place here. is there any alternative solution to address this issue
jcanseco commentedon May 2, 2022
@Vanditha-V-R please refer to this guide on how to display code blocks in GitHub comments.
Vanditha-V-R commentedon May 3, 2022
@jcanseco : pls look in to this
apiVersion: secretmanager.cnrm.cloud.google.com/v1beta1
kind: SecretManagerSecret
metadata:
name: prodsecret
namespace: config-control # kpt-set: ${namespace}
annotations:
labels:
spec:
expireTime: 2022-12-30T12:30:00Z
replication:
rotation:
topics:
jcanseco commentedon May 4, 2022
@Vanditha-V-R Again, please format your entire YAML. It is very difficult to determine what you're actually applying if you give us unformatted YAML.
Also, have you tried
kubectl apply-ing yourSecretManagerSecretresource directly? The error message you're seeing is coming from Config Sync (KNV2009) -- can you check if using just Config Connector works?Vanditha-V-R commentedon May 4, 2022
@jcanseco

jcanseco commentedon May 4, 2022
Great thank you. We would have preferred formatted text, but this is good enough for now since it's not too long.
Let us try to reproduce the issue then.
caieo commentedon May 9, 2022
@Vanditha-V-R, I was able to reproduce your issue. The field in question that is causing this error is
spec.topics. We're looking into why this is occurring and do not currently have a workaround for you at the moment.caieo commentedon May 11, 2022
@Vanditha-V-R, I've identified the bug causing this issue and have a fix going through review. Once it's merged, it will be included in next week's release.
caieo commentedon Jun 27, 2022
@Vanditha-V-R, we released a fix in 1.85.0, please give it a try. I'm going to go ahead and close this issue for now, but if you still run into this issue or have any other issues, please feel free to re-open or file another bug!
Vanditha-V-R commentedon Jun 28, 2022