generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 262
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
Description
I'm having an issue with 0.6.0- I can no longer use this: ${schema.metadata.namespace}
Observed Behavior:
message: >-
failed to validate node "certificate": failed to type-check template
expression "schema.metadata.namespace" at path "spec.dnsNames[0]":
ERROR: <input>:1:16: undefined field 'namespace'
| schema.metadata.namespace
| ...............^
observedGeneration: 9
reason: InvalidResourceGraph
status: 'False'
type: ResourceGraphAccepted
I have tried many different ways to try and "safely" reference namespace but the new validation is very restrictive... Or I have no idea what I am doing.
Expected Behavior:
can reference instance's deployed namespace in RGD resources
Reproduction Steps (Please include ResourceGraphDefinition and Instances files):
resource graph:
apiVersion: kro.run/v1alpha1
kind: ResourceGraphDefinition
metadata:
name: tenant-tls
spec:
schema:
apiVersion: v1alpha1
kind: TenantTLS
spec:
domain: string | default=example.com
issuerRef:
name: string | default=letsencrypt
kind: string | default=ClusterIssuer
resources:
- id: certificate
template:
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: tenant-env-cert
annotations:
argocd.argoproj.io/tracking-id: ${schema.metadata.?annotations["argocd.argoproj.io/tracking-id"].orValue("")}
spec:
secretName: tenant-env-cert
issuerRef:
name: ${schema.spec.issuerRef.name}
kind: ${schema.spec.issuerRef.kind}
dnsNames:
- '*.${schema.metadata.namespace}.${schema.spec.domain}'
- '${schema.metadata.namespace}.${schema.spec.domain}'instance:
apiVersion: kro.run/v1alpha1
kind: TenantTLS
metadata:
name: tenant-env-certNote:
I'm using an ArgoCD ApplicationSet that discovers instance resources like: apps/{tenant}/*/{env}/
And it will specify the target namespace like: {tenant}-{env}
Versions:
- kro version: 0.6.0
- Kubernetes Version (
kubectl version):
Client Version: v1.30.2
Server Version: v1.32.9-eks-113cf36
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Which option describes the most your issue?
No response
artyom-p
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.