-
Notifications
You must be signed in to change notification settings - Fork 988
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create cert-manager selfSigned Issuer #1352
Comments
@kyschouv What you are seeing here is an error response from the Cert Manager validation web hook. It's trying to signal that the Issuer CR must actually contain at least one "issuer" entry in the "spec" section. I haven't used Cert Manger myself, but this is how the error message reads to me. It's not a provider problem, as far as I can tell. |
@alexsomesan This is the same form as the yaml that cert-manager specifies to use to create a selfSigned issuer. It needs an empty object for This is definitely something I can deploy fine with yaml. But converting that yaml to hcl and deploying it with |
I have the same problem and the problem actually appears to originate in the terraform kubernetes provider. The reasoning behind this conclusion is as follows:
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: selfsigned-cluster-issuer
spec:
selfSigned: {}
# kubernetes_manifest.cluster_issuer will be created
+ resource "kubernetes_manifest" "cluster_issuer" {
+ manifest = {
+ apiVersion = "cert-manager.io/v1"
+ kind = "ClusterIssuer"
+ metadata = {
+ name = "selfsigned-local"
}
+ spec = {
+ selfSigned = {}
}
}
+ object = {
+ apiVersion = "cert-manager.io/v1"
+ kind = "ClusterIssuer"
+ metadata = {
+ name = "selfsigned-local"
}
+ spec = {
+ acme = {
+ disableAccountKeyGeneration = (known after apply)
+ email = (known after apply)
+ enableDurationFeature = (known after apply)
+ externalAccountBinding = {
+ keyAlgorithm = (known after apply)
+ keyID = (known after apply)
+ keySecretRef = {
+ key = (known after apply)
+ name = (known after apply)
}
}
+ preferredChain = (known after apply)
+ privateKeySecretRef = {
+ key = (known after apply)
+ name = (known after apply)
}
+ server = (known after apply)
+ skipTLSVerify = (known after apply)
+ solvers = (known after apply)
}
+ ca = {
+ crlDistributionPoints = (known after apply)
+ ocspServers = (known after apply)
+ secretName = (known after apply)
}
+ selfSigned = {
+ crlDistributionPoints = (known after apply)
}
+ vault = {
+ auth = {
+ appRole = {
+ path = (known after apply)
+ roleId = (known after apply)
+ secretRef = {
+ key = (known after apply)
+ name = (known after apply)
}
}
+ kubernetes = {
+ mountPath = (known after apply)
+ role = (known after apply)
+ secretRef = {
+ key = (known after apply)
+ name = (known after apply)
}
}
+ tokenSecretRef = {
+ key = (known after apply)
+ name = (known after apply)
}
}
+ caBundle = (known after apply)
+ namespace = (known after apply)
+ path = (known after apply)
+ server = (known after apply)
}
+ venafi = {
+ cloud = {
+ apiTokenSecretRef = {
+ key = (known after apply)
+ name = (known after apply)
}
+ url = (known after apply)
}
+ tpp = {
+ caBundle = (known after apply)
+ credentialsRef = {
+ name = (known after apply)
}
+ url = (known after apply)
}
+ zone = (known after apply)
}
}
}
} the above is geenrated from the following ressource: resource "kubernetes_manifest" "cluster_issuer" {
manifest = {
apiVersion = "cert-manager.io/v1"
kind = "ClusterIssuer"
metadata = {
name = "selfsigned-local"
}
spec = {
selfSigned = {}
}
}
} |
Can confirm, I am experiencing this right now:
The YAML works fine: apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: self-signed-cluster-issuer
namespace: cert-manager
spec:
selfSigned: {} The error suggests that the resource "kubernetes_manifest" "self_signed_cluster_issuer" {
manifest = {
apiVersion = "cert-manager.io/v1"
kind = "ClusterIssuer"
metadata = {
name = "self-signed-cluster-issuer"
}
spec = {
selfSigned = {}
}
}
} |
So I just dug into this a bunch, and have some tests to reproduce it, I'll get some stuff up tomorrow. There is a hack that kind of works for now:
This will create the issuer, but also error out with: But at least it applies. |
This issue seems to be fixed in the 2.6.0 release fyi |
Marking this issue as stale due to inactivity. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. This helps our maintainers find and focus on the active issues. Maintainers may also remove the stale label at their discretion. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
This appears to be the same behavior as seen in the kubernetes-alpha provider:
hashicorp/terraform-provider-kubernetes-alpha#167
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
kubernetes_manifest
Terraform Configuration Files
Steps to Reproduce
Apply the above resource.
Expected Behavior
It should deploy the resource.
Actual Behavior
I get an error. It appears to be stripping the
selfSigned
portion of the manifest.The text was updated successfully, but these errors were encountered: