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

Added missing Tekton ConfigMaps and Secrets. #443

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

amadhusu
Copy link
Contributor

@amadhusu amadhusu commented Nov 6, 2023

The issue resolved by this Pull Request:

Resolves #377

Description of your changes:

Added missing Tekton ConfigMaps and Secrets. Also modified kustomization.yaml files to ensure that namePrefix is added to all the other files except for these specific ConfigMaps and Secrets.

Testing instructions

  1. Ensure the OCP Cluster you test on has OpenShift Pipelines Operator (v1.12.0+) installed.
  2. Run make v2deploy V2INFRA_NS=${OPERATOR_NS} after setting OPERATOR_NS to the openshift-pipelines namespace.
  3. Ensure the specific ConfigMaps and Secrets are created as per screenshots below:

configmaps

secrets

  1. Ensure all the webhook pods are up and running without throwing any errors in the logs of missing the respective configmaps and secrets.

Checklist

  • The commits are squashed in a cohesive manner and have meaningful messages.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work

@dsp-developers
Copy link
Contributor

A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-443
An OCP cluster where you are logged in as cluster admin is required.

To use this image run the following:

cd $(mktemp -d)
git clone git@github.com:opendatahub-io/data-science-pipelines-operator.git
cd data-science-pipelines-operator/
git fetch origin pull/443/head
git checkout -b pullrequest d9a8e749d8e390681810daa83b556413103fc425
make deploy IMG="quay.io/opendatahub/data-science-pipelines-operator:pr-443"

More instructions here on how to deploy and test a Data Science Pipelines Application.

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-443

@@ -1,3 +1,5 @@
namePrefix: data-science-pipelines-operator-
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason why we're adding name Prefixes to individual directories' kustomization.yaml's?

Copy link
Member

Choose a reason for hiding this comment

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

Okay nvm, read the description.

Copy link
Contributor

Choose a reason for hiding this comment

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

Opening this comment. This should not be part of this PR but part of a follow-up issue to fix later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rimolive Due to the namePrefix already being in the base kustomization.yaml file, the ConfigMaps and Secrets were inadvertently getting the same prefix which didn't resolve this particular issue. I had no choice but to move all these namePrefix's to the respective kustomization.yaml's to prevent the ConfigMap and Secrets from inheriting the same. Also I researched if there was a possibility to exclude such namePrefix's for said types, but it wasn't designed to skip unfortunately.

Copy link
Contributor

@HumairAK HumairAK Nov 9, 2023

Choose a reason for hiding this comment

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

@amadhusu you are right, but @rimolive 's point is valid, let me propose a different solution, add these configmap/secrets here: https://github.com/opendatahub-io/data-science-pipelines-operator/tree/dspv2/config/overlays/make-v2deploy

and not part of the v2 kustomize build, so the annotations are not inherited. This is also useful to separate these out, because we will likely want to remove these later (we don't want to add tekton resources, it's more or less to get the deployment in a working state right now), since these are tekton resources and it's unclear right now why they are not included by openshift-pipelines.

Copy link
Contributor Author

@amadhusu amadhusu Nov 10, 2023

Choose a reason for hiding this comment

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

Oh I missed the fact, there is another base kustomization.yaml which supercedes the v2 kustomize build. I am modifying the PR to include the ConfigMaps and Secrets here instead which makes more sense. Thanks @HumairAK .

Copy link
Contributor

@rimolive rimolive left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

@rimolive rimolive left a comment

Choose a reason for hiding this comment

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

Just to summarize: we should not make any changes on the namePrefix attribute. Just make sure all the congimaps/secrets are present in this PR.

@@ -1,3 +1,5 @@
namePrefix: data-science-pipelines-operator-
Copy link
Contributor

Choose a reason for hiding this comment

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

Opening this comment. This should not be part of this PR but part of a follow-up issue to fix later

config/v2/driver/kustomization.yaml Outdated Show resolved Hide resolved
config/v2/exithandler/controller/kustomization.yaml Outdated Show resolved Hide resolved
config/v2/exithandler/crd/kustomization.yaml Outdated Show resolved Hide resolved
config/v2/kfptask/controller/kustomization.yaml Outdated Show resolved Hide resolved
config/v2/pipelineloop/controller/kustomization.yaml Outdated Show resolved Hide resolved
config/v2/pipelineloop/crd/kustomization.yaml Outdated Show resolved Hide resolved
config/v2/pipelineloop/leaderelection/kustomization.yaml Outdated Show resolved Hide resolved
config/v2/pipelineloop/webhook/kustomization.yaml Outdated Show resolved Hide resolved
config/v2/tektoncrds/kustomization.yaml Outdated Show resolved Hide resolved
@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-443

@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-443

Signed-off-by: Achyut Madhusudan <amadhusu@redhat.com>
@dsp-developers
Copy link
Contributor

Change to PR detected. A new PR build was completed.
A new image has been built to help with testing out this PR: quay.io/opendatahub/data-science-pipelines-operator:pr-443

@@ -5,7 +5,6 @@ resources:
- mutatingwebhookconfig.yaml
- role.yaml
- rolebinding.yaml
- secret.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

@amadhusu the resources here are part of the exithandler/webhook component, this is how the organization is for the v2 directory and we should remain consistent.

Can you make the following changes:

  • move this secret back to config/v2/exithandler/webhook/secret.yaml
  • same with config/v2/kfptask/webhook/secret.yaml
  • move config/v2/secrets/tektonpipelineloopwebhookcertssecret.yaml to config/v2/pipelineloop/webhook/secret.yaml
  • rename config/v2/configmaps to config/v2/tektonconfigs

Copy link
Contributor Author

@amadhusu amadhusu Nov 10, 2023

Choose a reason for hiding this comment

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

@HumairAK - To clarify, you want me to revert the changes to the locations of these secrets but include these secrets directly via the base kustomization.yaml (https://github.com/opendatahub-io/data-science-pipelines-operator/tree/dspv2/config/overlays/make-v2deploy)?

OR

do you want me to revert the changes to the location of these secrets and also the revert the kustomization.yaml in each webhook subdirectory which would circle us back to the original issue of namePrefix which would result in the bullet points mentioned below?

  • config/v2/exithandler/webhook/secret.yaml would become data-science-pipeline-operator-kfp-exithandler-webhook-certs after deployment to OCP instead of kfp-exithandler-webhook-certs
  • config/v2/kfptask/webhook/secret.yaml would become data-science-pipeline-operator-kfptask-webhook-certs after deployment to OCP instead of kfptask-webhook-certs
  • config/v2/pipelineloop/webhook/secret.yaml would become data-science-pipeline-operator-tektonpipelineloop-webhook-certs instead of tektonpipelineloop-webhook-certs

@HumairAK
Copy link
Contributor

/lgtm
/approve

Copy link
Contributor

openshift-ci bot commented Nov 10, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: HumairAK

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 ed4d5c0 into opendatahub-io:dspv2 Nov 10, 2023
5 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.

5 participants