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

Possible wrong instructions in https://docs.csc.fi/cloud/rahti2/usage/cli/ #2395

Open
nialov opened this issue Jan 16, 2025 · 0 comments
Open

Comments

@nialov
Copy link

nialov commented Jan 16, 2025

Problem

In section "Using a service account token", the presented code results in system:image-pusher role getting set to a user instead of a service account which we created.

oc create serviceaccount pusher
oc policy add-role-to-user system:image-pusher pusher
docker login -p $(oc sa get-token pusher) -u unused image-registry.apps.2.rahti.csc.fi

The use of -z flag is required to specify a service account.

oc policy add-role-to-user ROLE (USER | -z SERVICEACCOUNT) [USER ...] [flags] [options]

Solution

oc policy add-role-to-user system:image-pusher -z pusher

Additional info

❯ oc version
Client Version: v4.16.0
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Kubernetes Version: v1.28.2-3580+6216ea1e51a212-dirty
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant