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

Select namespace in oc tasks #192

Open
dnperfors opened this issue Sep 14, 2022 · 1 comment
Open

Select namespace in oc tasks #192

dnperfors opened this issue Sep 14, 2022 · 1 comment

Comments

@dnperfors
Copy link

I use these oc tasks in a pipeline that deploys to different namespaces in different stages, so first to my_project-dev, my_project_test, etc.
It would be great if it would be possible to select the namespace in the different tasks, this is especially useful in the OcConditionalCmd:
Current situation:

- task: OcConditionalCommand@2
  inputs:
    openshiftService: 'my_connection'
    cmd: 'rollout restart deployment/my_service --namespace my_project-dev'
    condition: 'exists'
    resource: 'deployment/my_service --namespace my_project-dev'

Desired situation:

- task: OcConditionalCommand@2
  inputs:
    openshiftService: 'my_connection'
    namespace: 'my_project-dev'
    cmd: 'rollout restart deployment/my_service'
    condition: 'exists'
    resource: 'deployment/my_service'

In this case especially I basically make use of a command injection issue to inject the namespace for the conditional check.

Other solutions would be to select the project in the oc-setup task

@lstocchi
Copy link
Contributor

Hi @dnperfors, thanks for the suggestion. Unfortunately this plugin is in maintainance mode atm and we are not planning to add new features. I'll keep this open as the situation could change soon. Just to let you know.
And sorry for the late reply.

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

2 participants