Skip to content

Update controller-tools to correctly set x-kubernetes-preserve-unknown-fields - #1946

Merged
jetstack-bot merged 1 commit into
cert-manager:masterfrom
munnerz:update-controller-tools
Oct 3, 2019
Merged

jetstack-bot merged 1 commit into
cert-manager:masterfrom
munnerz:update-controller-tools

Conversation

@munnerz

@munnerz munnerz commented Aug 1, 2019

Copy link
Copy Markdown
Member

What this PR does / why we need it:

Bumps our controller-tools dependency to correctly set the type/extensions for the 'raw JSON' field we have as part of the DNS01 webhook provider config.

Release note:

NONE

@jetstack-bot jetstack-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Aug 1, 2019
@jetstack-bot
jetstack-bot requested a review from JoshVanL August 1, 2019 12:28
@jetstack-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: munnerz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added area/deploy Indicates a PR modifies deployment configuration approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 1, 2019
@munnerz
munnerz force-pushed the update-controller-tools branch from da4b52f to a2a140c Compare August 1, 2019 13:08
@JoshVanL

JoshVanL commented Aug 1, 2019

Copy link
Copy Markdown
Contributor

/retest

@munnerz

munnerz commented Sep 27, 2019

Copy link
Copy Markdown
Member Author

Waiting on kubernetes-sigs/controller-tools#277

@munnerz
munnerz force-pushed the update-controller-tools branch from a2a140c to 534e36e Compare October 2, 2019 18:44
@jetstack-bot jetstack-bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 2, 2019
@munnerz

munnerz commented Oct 2, 2019

Copy link
Copy Markdown
Member Author

/test pull-cert-manager-e2e-v1-16

@munnerz

munnerz commented Oct 2, 2019

Copy link
Copy Markdown
Member Author

WDYT about adding this into the v0.11 milestone @JoshVanL? It appears to have changed a few fields in the CRD manifests, but they seem fairly benign and I think are from regular maintenance/updates in controller-tools.

Adding milestone so we remember to discuss tomorrow 😄

/milestone v0.11
/hold

@jetstack-bot jetstack-bot added this to the v0.11 milestone Oct 2, 2019
@jetstack-bot jetstack-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 2, 2019
@JoshVanL

JoshVanL commented Oct 3, 2019

Copy link
Copy Markdown
Contributor

/lgtm

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 3, 2019
@munnerz

munnerz commented Oct 3, 2019

Copy link
Copy Markdown
Member Author

/hold cancel

@jetstack-bot jetstack-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 3, 2019
@munnerz

munnerz commented Oct 3, 2019

Copy link
Copy Markdown
Member Author

/retest

@jetstack-bot

jetstack-bot commented Oct 3, 2019 •

Copy link
Copy Markdown
Contributor

@munnerz: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-cert-manager-e2e-v1-13 a2a140c link /test pull-cert-manager-e2e-v1-13

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@munnerz

munnerz commented Oct 3, 2019

Copy link
Copy Markdown
Member Author

/retest

@jetstack-bot
jetstack-bot merged commit 13fcbb9 into cert-manager:master Oct 3, 2019
@munnerz
munnerz deleted the update-controller-tools branch October 3, 2019 11:47
@zimbatm

zimbatm commented Oct 5, 2019

Copy link
Copy Markdown

not sure if it's related to this change:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.4", GitCommit:"67d2fcf276fcd9cf743ad4be9a9ef5828adc082f", GitTreeState:"archive", BuildDate:"1970-01-01T00:00:01Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.2", GitCommit:"66049e3b21efe110454d67df4fa62b08ea79a19b", GitTreeState:"clean", BuildDate:"2019-05-17T00:58:35Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

$ kubectl apply \
    -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.11/deploy/manifests/00-crds.yaml
error: error validating "https://raw.githubusercontent.com/jetstack/cert-manager/release-0.11/deploy/manifests/00-crds.yaml": error validating data: ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.solver.properties.dns01.properties.webhook.properties.config): unknown field "x-kubernetes-preserve-unknown-fields" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps; if you choose to ignore these errors, turn validation off with --validate=false

@uzxmx

uzxmx commented Oct 6, 2019

Copy link
Copy Markdown

I also met above problem:

$ kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.11/deploy/manifests/00-crds.yaml

error: error validating "https://raw.githubusercontent.com/jetstack/cert-manager/release-0.11/deploy/manifests/00-crds.yaml": error validating data: ValidationError(CustomResourceDefinition.spec.validation.openAPIV3Schema.properties.spec.properties.solver.properties.dns01.properties.webhook.properties.config): unknown field "x-kubernetes-preserve-unknown-fields" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps; if you choose to ignore these errors, turn validation off with --validate=false

Tried to change release-0.11 to release-0.10 and succeeded:

$ kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.10/deploy/manifests/00-crds.yaml

customresourcedefinition.apiextensions.k8s.io/certificaterequests.certmanager.k8s.io created
customresourcedefinition.apiextensions.k8s.io/certificates.certmanager.k8s.io created
customresourcedefinition.apiextensions.k8s.io/challenges.certmanager.k8s.io created
customresourcedefinition.apiextensions.k8s.io/clusterissuers.certmanager.k8s.io created
customresourcedefinition.apiextensions.k8s.io/issuers.certmanager.k8s.io created
customresourcedefinition.apiextensions.k8s.io/orders.certmanager.k8s.io created

@munnerz

munnerz commented Oct 6, 2019 via email

Copy link
Copy Markdown
Member Author

@kri5

kri5 commented Oct 8, 2019

Copy link
Copy Markdown
Contributor

Maybe the documentation should be updated accordingly?

I just ran into the issue and disabling validation doesn't feel expected when you use manifests.

@avirtual

avirtual commented Oct 9, 2019

Copy link
Copy Markdown

On kubernetes 1.13 when using --validate=false, it results into getting an error from cert-manager-cainjector, upon starting:

E1009 13:05:34.735148 1 source.go:88] cert-manager/controller-runtime/source "msg"="if kind is a CRD, it should be installed before calling Start" "error"="no matches for kind "Certificate" in version "certmanager.k8s.io/v1alpha1"" "kind"={"Group":"certmanager.k8s.io","Kind":"Certificate"}
E1009 13:05:34.735416 1 workqueue.go:37] cert-manager/controller-runtime/metrics "msg"="failed to register metric" "error"="duplicate metrics collector registration attempted" "name"="workqueue_longest_running_processor_microseconds" "queue"="mutatingwebhookconfiguration"
F1009 13:05:34.735344 1 start.go:123] error registering controllers: no matches for kind "Certificate" in version "certmanager.k8s.io/v1alpha1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/deploy Indicates a PR modifies deployment configuration dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants