ci-tools icon indicating copy to clipboard operation
ci-tools copied to clipboard

Remove cluster profile secrets from ci tools (& from `prowgen`)

Open psalajova opened this issue 1 year ago • 4 comments

This PR completely removes the cluster profiles' dependency on the Secret() function in code. prowgen will no longer generate the cluster profile volume and volume mount fields to prow jobs, meaning, if a test in a test config had a cluster profile defined, e.g.:

tests:
- as: e2e-aws-ovn
  steps:
    cluster_profile: aws
    workflow: openshift-e2e-aws

The generated prow job in release/ci-operator/jobs will have the secret-dir arg option, volume and volume mount fields removed.

Before:

...
    spec:
      containers:
      - args:
        ...
        - --secret-dir=/secrets/ci-pull-credentials
        - --secret-dir=/usr/local/e2e-aws-ovn-cluster-profile
        - --target=e2e-aws-ovn
        ...
        volumeMounts:
        - mountPath: /secrets/ci-pull-credentials
          name: ci-pull-credentials
          readOnly: true
        - mountPath: /usr/local/e2e-aws-ovn-cluster-profile
          name: cluster-profile
      serviceAccountName: ci-operator
      volumes:
      - name: cluster-profile
        secret:
          secretName: cluster-secrets-aws
      - name: manifest-tool-local-pusher
        secret:
          secretName: manifest-tool-local-pusher
...

After:

...
    spec:
      containers:
      - args:
        ...
        - --secret-dir=/secrets/ci-pull-credentials
        - --target=e2e-aws-ovn
        ...
        volumeMounts:
        - mountPath: /secrets/ci-pull-credentials
          name: ci-pull-credentials
          readOnly: true
      serviceAccountName: ci-operator
      volumes:
      - name: manifest-tool-local-pusher
        secret:
          secretName: manifest-tool-local-pusher
...

Merging of this PR will probably need to be synced with https://github.com/openshift/ci-tools/pull/4112 .

psalajova avatar Aug 13 '24 13:08 psalajova

/cc @droslean

psalajova avatar Aug 13 '24 13:08 psalajova

/test e2e

psalajova avatar Sep 06 '24 11:09 psalajova

/retest-required

psalajova avatar Oct 02 '24 13:10 psalajova

/test e2e

psalajova avatar Oct 23 '24 11:10 psalajova

/test remaining-required

openshift-ci-robot avatar Oct 24 '24 14:10 openshift-ci-robot

/test e2e

psalajova avatar Oct 24 '24 15:10 psalajova

/label tide/merge-method-squash /hold /lgtm

droslean avatar Oct 25 '24 11:10 droslean

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: droslean, psalajova

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:
  • ~~OWNERS~~ [droslean,psalajova]

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

openshift-ci[bot] avatar Oct 25 '24 11:10 openshift-ci[bot]

/unhold

psalajova avatar Oct 29 '24 11:10 psalajova

/test lint

psalajova avatar Oct 29 '24 11:10 psalajova

@psalajova: The following tests 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/security 0bde2c58e486c59d1d108b2073143c12b16580aa link false /test security
ci/prow/breaking-changes 0bde2c58e486c59d1d108b2073143c12b16580aa link false /test breaking-changes

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-sigs/prow repository. I understand the commands that are listed here.

openshift-ci[bot] avatar Oct 29 '24 13:10 openshift-ci[bot]

/override ci/prow/images

psalajova avatar Oct 29 '24 13:10 psalajova

/override ci/prow/images

psalajova avatar Oct 29 '24 14:10 psalajova

@psalajova: Overrode contexts on behalf of psalajova: ci/prow/images

In response to this:

/override ci/prow/images

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-sigs/prow repository.

openshift-ci[bot] avatar Oct 29 '24 14:10 openshift-ci[bot]

@psalajova: Overrode contexts on behalf of psalajova: ci/prow/images

In response to this:

/override ci/prow/images

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-sigs/prow repository.

openshift-ci[bot] avatar Oct 29 '24 14:10 openshift-ci[bot]