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

feat: Add attribute to allow specifyin deployment labels/annotations #793

Merged
merged 2 commits into from
Mar 17, 2022

Conversation

amisevsk
Copy link
Collaborator

What does this PR do?

Add attributes controller.devfile.io/deployment-labels and controller.devfile.io/deployment-annotations which can be used to specify labels and annotations to be applied to the workspace deployment

What issues does this PR fix or reference?

Closes #698

Is it tested? How?

To test, apply the DevWorkspace

cat <<EOF | kubectl apply -f -
apiVersion: workspace.devfile.io/v1alpha2
kind: DevWorkspace
metadata:
  name: plain
spec:
  routingClass: basic
  started: true
  template:
    attributes:
      controller.devfile.io/storage-type: ephemeral
      controller.devfile.io/deployment-labels: 
        my-label: foo
        my-other-label: bar
      controller.devfile.io/deployment-annotations: 
        my-attribute: foo
        my-other-attribute: bar
    components:
    - container:
        command:
        - tail
        - -f
        - /dev/null
        image: quay.io/amisevsk/web-terminal-tooling:dev
        memoryLimit: 512Mi
        mountSources: true
      name: web-terminal
EOF

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Add attributes
  * controller.devfile.io/deployment-labels
  * controller.devfile.io/deployment-annotations

to allow specifying labels and annotations that should be applied to the
DevWorkspace deployment.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Mar 17, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amisevsk, ibuziuk

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

@amisevsk amisevsk merged commit 01e0e27 into devfile:main Mar 17, 2022
@amisevsk amisevsk deleted the deploy-labels-annotations branch March 17, 2022 16:35
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.

Allow to specify annotation/labels for the Workspace
2 participants