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

router-secrets: set named certificates to empty array instead of nil when none found #288

Merged

Conversation

stlaz
Copy link
Member

@stlaz stlaz commented Jun 5, 2020

This fixed a small-ish bug in the router-secrets observer:

when running the repository-local e2e test, one could observe the following:

E0605 10:01:58.163141       1 base_controller.go:180] "ConfigObserver" controller failed to sync "key", err: .servingInfo.namedCertificates accessor error: <nil> is of the type <nil>, expected []interface{}
I0605 10:01:58.164534       1 event.go:278] Event(v1.ObjectReference{Kind:"Deployment", Namespace:"openshift-authentication-operator", Name:"authentication-operator", UID:"b7da59af-4c37-4be6-b870-c4810f2cd833", APIVersion:"apps/v1", ResourceVersion:"", FieldPath:""}): type: 'Normal' reason: 'ObservedConfigChanged' Writing updated observed config:   map[string]interface{}{
        "oauthServer": map[string]interface{}{
                "corsAllowedOrigins": []interface{}{string(`//127\.0\.0\.1(:|$)`), string("//localhost(:|$)")},
                "oauthConfig":        map[string]interface{}{"assetPublicURL": string("https://console-openshift-console.apps.sl-bn.group-b.devcluster.openshift.com"), "loginURL": string("https://api.sl-bn.group-b.devcluster.openshift.com:6443")},
                "servingInfo": map[string]interface{}{
                        "cipherSuites":      []interface{}{string("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"), string("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"), string("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"), string("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"), string("TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305"), string("TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305")},
                        "minTLSVersion":     string("VersionTLS12"),
-                       "namedCertificates": nil,
+                       "namedCertificates": []interface{}(nil),
                },
        },
  }

stlaz added 2 commits June 5, 2020 11:56
…when none found

This prevents spamming errors in the observer when no certificates are
found in the router secret.
@stlaz
Copy link
Member Author

stlaz commented Jun 5, 2020

/cc @marun @vareti

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 5, 2020
@stlaz
Copy link
Member Author

stlaz commented Jun 5, 2020

/retest

@marun
Copy link
Contributor

marun commented Jun 5, 2020

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: marun, stlaz

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

The pull request process is described here

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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 5, 2020
@openshift-merge-robot openshift-merge-robot merged commit ee83ab9 into openshift:master Jun 5, 2020
@marun
Copy link
Contributor

marun commented Sep 10, 2020

/cherry-pick release-4.5

@openshift-cherrypick-robot

@marun: new pull request created: #342

In response to this:

/cherry-pick release-4.5

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.

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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants