Skip to content

Export ACM certificate to tls secret in ReadOnly mode #2747

@jhcolville

Description

@jhcolville

Describe the bug

We manage the lifecycle of our ACM certificates outside of k8s/ACK.

We're trying to use the ReadOnly feature gate that the acm-chart supports to adopt an existing ACM certificate and then also use the exportTo: functionality illustrated here to output the certificate to a k8s tls secret.

Based on various suggestions in issues found here we've tried combinations of the read-only and adoption-fields / adoption-policy to try and achieve this however the most consistent error we see is "resource not found".

Does the ACM controller support read-only / adopted resources?

If so, can it export to a k8s tls secret for both the tls.crt and tls.key fields?

If not is there any indication as to when this kind of feature may exist?

Thanks in advance!

Steps to reproduce

  • deploy acm-controller from helm chart 1.3.2

  • deploy Certificate CR similar to:

apiVersion: acm.services.k8s.aws/v1alpha1
kind: Certificate
metadata:
  name: nginx-ingress-tls-secret
  namespace: cluster-ingress
  annotations:
    services.k8s.aws/read-only: "true"
spec:
  domainName: my.domain
  exportTo:
    namespace: cluster-ingress
    name: nginx-ingress-tls-secret
    key: tls.crt
  • errors result:
ERROR   Reconciler error        {"controller": "certificate", "controllerGroup": "acm.services.k8s.aws", "controllerKind": "Certificate", "Certificate": {"name":"nginx-ingress-tls-secret","namespace":"cluster-ingress"}, "namespace": "cluster-ingress", "name": "nginx-ingress-tls-secret", "reconcileID": "fcad16e9-41f1-4540-ab39-1f1967b339fc", "error": "read-only resource not found"}

Expected outcome

Existing ACM certificate is located and exported to target kubernetes.io/tls secret.

Environment

  • acm-controller 1.3.2
  • k8s/eks v1.33.5-eks-3025e55
  • attempting to export from existing ACM certicificate to kubernetes tls secret.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.service/acmIndicates issues or PRs that are related to acm-controller.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions