Skip to content
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

ClusterIssuers - A valid label must be an empty string or consist of alphanumeric characters #123

Open
Kerwood opened this issue Apr 1, 2020 · 0 comments

Comments

@Kerwood
Copy link

Kerwood commented Apr 1, 2020

Trying to deploy below a ClusterIssuer. But Mortar pops up with an error.
Deploying with kubectl goes through fine, as it should.

cluster-issuer.yml

apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
  name: letsencrypt
spec:
  acme:
    email: <email>
    server: https://acme-v02.api.letsencrypt.org/directory
    privateKeySecretRef:
      name: le-dns-issuer
    solvers:
    - dns01:
        cloudflare:
          email: <email>
          apiTokenSecretRef:
            name: cloudflare-api-key
            key: token

Mortar

mortar fire le-issuer le-issuer/cluster-issuer.yml
Traceback (most recent call last):
	14: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/bin/mortar:23:in `<main>'
	13: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/bin/mortar:23:in `load'
	12: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/kontena-mortar-0.4.6/bin/mortar:13:in `<top (required)>'
	11: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/clamp-1.3.1/lib/clamp/command.rb:140:in `run'
	10: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/clamp-1.3.1/lib/clamp/command.rb:66:in `run'
	 9: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/clamp-1.3.1/lib/clamp/subcommand/execution.rb:18:in `execute'
	 8: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/clamp-1.3.1/lib/clamp/command.rb:66:in `run'
	 7: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/kontena-mortar-0.4.6/lib/mortar/fire_command.rb:66:in `execute'
	 6: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/k8s-client-0.10.4/lib/k8s/stack.rb:100:in `apply'
	 5: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/k8s-client-0.10.4/lib/k8s/stack.rb:100:in `map'
	 4: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/k8s-client-0.10.4/lib/k8s/stack.rb:103:in `block in apply'
	 3: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/k8s-client-0.10.4/lib/k8s/client.rb:225:in `create_resource'
	 2: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/k8s-client-0.10.4/lib/k8s/resource_client.rb:148:in `create_resource'
	 1: from /__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/k8s-client-0.10.4/lib/k8s/transport.rb:287:in `request'
/__enclose_io_memfs__/lib/ruby/gems/2.5.0/gems/k8s-client-0.10.4/lib/k8s/transport.rb:263:in `parse_response': POST /apis/cert-manager.io/v1alpha2/clusterissuers => HTTP 422 Unprocessable Entity: ClusterIssuer.cert-manager.io "letsencrypt" is invalid: metadata.labels: Invalid value: "le-issuer/cluster-issuer.yml": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?') (K8s::Error::Invalid)

Kubectl

kubectl apply -f le-issuer/cluster-issuer.yml
clusterissuer.cert-manager.io/letsencrypt created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant