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

Add a role for Data Science Pipelines end user #112

Merged
merged 1 commit into from
May 4, 2023
Merged

Add a role for Data Science Pipelines end user #112

merged 1 commit into from
May 4, 2023

Conversation

DharmitD
Copy link
Member

@DharmitD DharmitD commented May 3, 2023

Description

Adding a role for the DSP end user to utlize for long term programmatic access.

How Has This Been Tested?

  • Deploy DSPO and create a DSPA instance
  • Create a ServiceAccount in a different namespace. Here's an example:
kind: ServiceAccount
apiVersion: v1
metadata:
  name: test-dsp-service-account
  namespace: test-dspa-sa
  • Create a RoleBinding that binds the role defined in this PR, in the same namespace as the DSPA instance. Reference the SA in this RoleBinding. Here's a sample RoleBinding that can be applied:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ds-pipeline-user-access-sample
  namespace: <same-namespace-as-DSP-instance>
subjects:
  - kind: ServiceAccount
    name: test-dsp-service-account
    namespace: test-dspa-sa
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: ds-pipeline-user-access-sample
  • Create a token for this SA:
    export SA_TOKEN=$(oc sa new-token test-dsp-service-account -n test-dspa-sa)

  • Curl to the Pipelines API Server using this token and the UI route:
    ROUTE=$(oc get route ds-pipeline-ui-sample --template={{.spec.host}})

curl -H "Authorization: Bearer ${SA_TOKEN}" https://${ROUTE}/apis/v1beta1/pipelines

You should find the demo pipeline listed out with it's specifications.

Merge criteria:

  • 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

@DharmitD DharmitD marked this pull request as draft May 3, 2023 13:56
@openshift-ci openshift-ci bot requested review from harshad16 and HumairAK May 3, 2023 13:56
@DharmitD DharmitD changed the title Add a role for DSPO end user WIP: Add a role for DSPO end user May 3, 2023
@DharmitD DharmitD marked this pull request as ready for review May 3, 2023 15:16
@openshift-ci openshift-ci bot requested a review from rimolive May 3, 2023 15:16
@DharmitD DharmitD changed the title WIP: Add a role for DSPO end user Add a role for DSPO end user May 4, 2023
@DharmitD DharmitD changed the title Add a role for DSPO end user Add a role for Data Science Pipelines end user May 4, 2023
@HumairAK
Copy link
Contributor

HumairAK commented May 4, 2023

Tested with quay.io/opendatahub/data-science-pipelines-operator:pr-112

Works as described, gained access with an SA in a different namespace that previously did not have access after creating the rolebinding as described in OP.

/lgtm
/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 4, 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-ci openshift-ci bot added the approved label May 4, 2023
@openshift-merge-robot openshift-merge-robot merged commit 86f66b2 into opendatahub-io:main May 4, 2023
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.

3 participants