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

[SRVKS-1179] enable secret filter informer by default #2445

Conversation

skonto
Copy link
Contributor

@skonto skonto commented Jan 16, 2024

Fixes JIRA #SRVKS-1179

Proposed Changes

  • As per title. We enable it for net-istio and net-kourier. Later on we will set the env vars directly in the net-* manifests too, when we make this the default upstream.
  • Deprecated annotation for net-istio is removed.
  • Allows to disable the feature via the workload overrides in Serving CR as usual.

// TODO: Annotation is deprecated, remove in future releases
secretInformerFilteringAnnotation = "serverless.openshift.io/enable-secret-informer-filtering"
)
// TODO: Maybe decide to fetch from net-kourier deps instead
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking of moving that const to knative.dev/pkg upstream or something so net-istio could benefit from it. So not eager to bring in the net-kourier dep.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably better to move it to pkg upstream. Do you want to create a JIRA for that. We'll probably forget the TODO here.

@skonto skonto requested review from ReToCode and removed request for jcrossley3 and dsimansk January 16, 2024 11:37
@skonto skonto force-pushed the enable_secret_filter_informers_by_default branch from a11bd47 to dab1bc0 Compare January 16, 2024 11:38
@@ -41,7 +36,8 @@ func enableSecretInformerFilteringTransformers(ks base.KComponent) []mf.Transfor

func injectLabelIntoInternalEncryptionSecret() mf.Transformer {
return func(u *unstructured.Unstructured) error {
if u.GetKind() == "Secret" && u.GetName() == ServingInternalCertName {
//nolint:staticcheck // ignore the deprecation until internal encryption is implemented downstream
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As good as it can gets: golangci/golangci-lint#741.

@skonto
Copy link
Contributor Author

skonto commented Jan 16, 2024

/test ?

Copy link
Contributor

openshift-ci bot commented Jan 16, 2024

@skonto: The following commands are available to trigger required jobs:

  • /test 411-images
  • /test 411-operator-e2e-aws-ocp-411
  • /test 411-test-upgrade-aws-ocp-411
  • /test 414-aws-ovn-images
  • /test 414-azure-images
  • /test 414-gcp-images
  • /test 414-hypershift-images
  • /test 414-images
  • /test 414-operator-e2e-aws-ocp-414
  • /test 414-osd-images
  • /test 414-single-node-images
  • /test 414-test-upgrade-aws-ocp-414
  • /test 414-vsphere-images
  • /test ocp4.14-lp-interop-images
  • /test ocp4.15-lp-interop-images
  • /test unit-test

The following commands are available to trigger optional jobs:

  • /test 411-kitchensink-e2e-aws-ocp-411
  • /test 411-kitchensink-upgrade-aws-ocp-411
  • /test 411-mesh-e2e-aws-ocp-411
  • /test 411-mesh-upgrade-aws-ocp-411
  • /test 411-ui-e2e-aws-ocp-411
  • /test 411-upstream-e2e-aws-ocp-411
  • /test 411-upstream-e2e-kafka-aws-ocp-411
  • /test 414-kitchensink-e2e-aws-ocp-414
  • /test 414-kitchensink-upgrade-aws-ocp-414
  • /test 414-mesh-e2e-aws-ocp-414
  • /test 414-mesh-upgrade-aws-ocp-414
  • /test 414-ui-e2e-aws-ocp-414
  • /test 414-upstream-e2e-aws-ocp-414
  • /test 414-upstream-e2e-kafka-aws-ocp-414

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-knative-serverless-operator-main-411-images
  • pull-ci-openshift-knative-serverless-operator-main-414-aws-ovn-images
  • pull-ci-openshift-knative-serverless-operator-main-414-azure-images
  • pull-ci-openshift-knative-serverless-operator-main-414-gcp-images
  • pull-ci-openshift-knative-serverless-operator-main-414-hypershift-images
  • pull-ci-openshift-knative-serverless-operator-main-414-images
  • pull-ci-openshift-knative-serverless-operator-main-414-operator-e2e-aws-ocp-414
  • pull-ci-openshift-knative-serverless-operator-main-414-osd-images
  • pull-ci-openshift-knative-serverless-operator-main-414-single-node-images
  • pull-ci-openshift-knative-serverless-operator-main-414-test-upgrade-aws-ocp-414
  • pull-ci-openshift-knative-serverless-operator-main-414-upstream-e2e-aws-ocp-414
  • pull-ci-openshift-knative-serverless-operator-main-414-upstream-e2e-kafka-aws-ocp-414
  • pull-ci-openshift-knative-serverless-operator-main-414-vsphere-images
  • pull-ci-openshift-knative-serverless-operator-main-unit-test

In response to this:

/test ?

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.

@skonto
Copy link
Contributor Author

skonto commented Jan 16, 2024

/test 414-mesh-e2e-aws-ocp-414

@skonto
Copy link
Contributor Author

skonto commented Jan 16, 2024

/test 414-mesh-upgrade-aws-ocp-414

// TODO: Annotation is deprecated, remove in future releases
secretInformerFilteringAnnotation = "serverless.openshift.io/enable-secret-informer-filtering"
)
// TODO: Maybe decide to fetch from net-kourier deps instead
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, probably better to move it to pkg upstream. Do you want to create a JIRA for that. We'll probably forget the TODO here.

if tf == nil {
t.Errorf("Secret transformer should not be nil")
}
if c.shouldAddLabelToSecret && tf == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I'd say the old version was more readable. The else if part is a bit hard to parse.

Copy link
Contributor Author

@skonto skonto Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part was not tested in the past. We missed that case so it is complete now. The else part means that if we should not add a label to a secret for this case we should not have generated a transformer.
Let me check if I can improve it.

@skonto skonto force-pushed the enable_secret_filter_informers_by_default branch from a58603c to bf63b97 Compare January 23, 2024 13:17
@skonto
Copy link
Contributor Author

skonto commented Jan 23, 2024

/hold until docs team verifies it can document it. See discussion here.

Copy link
Member

@ReToCode ReToCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm label Jan 23, 2024
@skonto
Copy link
Contributor Author

skonto commented Jan 31, 2024

/unhold

Update: docs team has set this as a blocker for 1.32, see https://redhat-internal.slack.com/archives/CGUG69160/p1706703811019039?thread_ts=1706018885.016239&cid=CGUG69160.

@skonto skonto force-pushed the enable_secret_filter_informers_by_default branch from bf63b97 to 6dae262 Compare January 31, 2024 17:45
@openshift-ci openshift-ci bot removed the lgtm label Jan 31, 2024
@skonto
Copy link
Contributor Author

skonto commented Jan 31, 2024

@ReToCode ready again, had to rebase.

Copy link
Contributor

openshift-ci bot commented Jan 31, 2024

@skonto: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/415-test-upgrade-aws-ocp-415 a58603c link true /test 415-test-upgrade-aws-ocp-415

Full PR test history. Your PR dashboard.

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.

Copy link
Member

@ReToCode ReToCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

/retest-required

@openshift-ci openshift-ci bot added the lgtm label Feb 1, 2024
Copy link
Contributor

openshift-ci bot commented Feb 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ReToCode, skonto

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-merge-bot openshift-merge-bot bot merged commit 88d09c3 into openshift-knative:main Feb 1, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants