Skip to content

Commit c891e9c

Browse files
committed
workaround for certificate reference
Signed-off-by: Johannes Aubart <johannes.aubart@sap.com>
1 parent e8f495a commit c891e9c

1 file changed

Lines changed: 39 additions & 17 deletions

File tree

resource-graph-definitions/remote-observability.yaml

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -418,36 +418,58 @@ spec:
418418
type: ${sharedImagePullSecret.type}
419419
data: ${sharedImagePullSecret.data}
420420

421-
- id: observabilityClientCert
422-
externalRef:
423-
apiVersion: cert-manager.io/v1
424-
kind: Certificate
425-
metadata:
426-
name: ${schema.spec.gateway.clientCertName}
427-
namespace: ${schema.spec.gateway.namespace}
421+
# Referencing a 'Certificate' is currently not possible, because this CRD is only created when the cert-manager is deployed,
422+
# but kro tries to validate it already during creation of the ResourceGraphDefinition.
423+
# See https://github.com/kubernetes-sigs/kro/issues/1293 for details.
424+
# As a workaround, we reference the secrets directly, using their hard-coded names.
425+
# - id: observabilityClientCert
426+
# externalRef:
427+
# apiVersion: cert-manager.io/v1
428+
# kind: Certificate
429+
# metadata:
430+
# name: ${schema.spec.gateway.clientCertName}
431+
# namespace: ${schema.spec.gateway.namespace}
428432

433+
# - id: observabilityClientCertSecret
434+
# externalRef:
435+
# apiVersion: v1
436+
# kind: Secret
437+
# metadata:
438+
# name: ${observabilityClientCert.spec.secretName}
439+
# namespace: ${schema.spec.gateway.namespace}
440+
441+
# - id: otlpLogsCert
442+
# externalRef:
443+
# apiVersion: cert-manager.io/v1
444+
# kind: Certificate
445+
# metadata:
446+
# name: ${schema.spec.gateway.otlpLogsCertName}
447+
# namespace: ${schema.spec.gateway.namespace}
448+
449+
# - id: otlpLogsCertSecret
450+
# externalRef:
451+
# apiVersion: v1
452+
# kind: Secret
453+
# metadata:
454+
# name: ${otlpLogsCert.spec.secretName}
455+
# namespace: ${schema.spec.gateway.namespace}
456+
457+
# Remove after the issue mentioned above is fixed.
429458
- id: observabilityClientCertSecret
430459
externalRef:
431460
apiVersion: v1
432461
kind: Secret
433462
metadata:
434-
name: ${observabilityClientCert.spec.secretName}
435-
namespace: ${schema.spec.gateway.namespace}
436-
437-
- id: otlpLogsCert
438-
externalRef:
439-
apiVersion: cert-manager.io/v1
440-
kind: Certificate
441-
metadata:
442-
name: ${schema.spec.gateway.otlpLogsCertName}
463+
name: observability-client-ca-cert
443464
namespace: ${schema.spec.gateway.namespace}
444465

466+
# Remove after the issue mentioned above is fixed.
445467
- id: otlpLogsCertSecret
446468
externalRef:
447469
apiVersion: v1
448470
kind: Secret
449471
metadata:
450-
name: ${otlpLogsCert.spec.secretName}
472+
name: otlp-logs-cert
451473
namespace: ${schema.spec.gateway.namespace}
452474

453475
- id: remoteClientCertSecret

0 commit comments

Comments
 (0)