Skip to content

Allow to set Tolerations via spec.deployments.tolerations - #747

Merged
knative-prow-robot merged 1 commit into
knative:mainfrom
nak3:support-tolerations
Sep 1, 2021
Merged

knative-prow-robot merged 1 commit into
knative:mainfrom
nak3:support-tolerations

Conversation

@nak3

@nak3 nak3 commented Sep 1, 2021

Copy link
Copy Markdown
Contributor

Part of #5

This patch adds spec.deployments.tolerations to set tolerations on
each deployment.

For example, when the following CR is created,

apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
  name: ks
  namespace: knative-serving
spec:
  high-availability:
    replicas: 1

  deployments:
  - name: webhook
    tolerations:
    - effect: NoSchedule
      key: node-type
      operator: Equal
      value: production

The webhook deployment has spec.template.spec.tolerations.

$ kubectl get deploy webhook -o jsonpath={.spec.template.spec.tolerations}
[{"effect":"NoSchedule","key":"node-type","operator":"Equal","value":"production"}]

/cc @houshengbo

Part of #5

This patch adds `spec.deployments.tolerations` to set tolerations on
each deployment.

For example, when the following CR is created,
```
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
  name: ks
  namespace: knative-serving
spec:
  high-availability:
    replicas: 1

  deployments:
  - name: webhook
    tolerations:
    - effect: NoSchedule
      key: node-type
      operator: Equal
      value: production
```

The webhook deployment has `spec.template.spec.tolerations`.

```
$ kubectl get deploy webhook -o jsonpath={.spec.template.spec.tolerations}
[{"effect":"NoSchedule","key":"node-type","operator":"Equal","value":"production"}]
```
@google-cla google-cla Bot added the cla: yes Indicates the PR's author has signed the CLA. label Sep 1, 2021
@knative-prow-robot knative-prow-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 1, 2021
@knative-metrics-robot

Copy link
Copy Markdown

The following is the coverage report on the affected files.
Say /test pull-knative-operator-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/common/deployments_override.go 85.7% 86.8% 1.1

@houshengbo

Copy link
Copy Markdown
Contributor

@nak3 thx so much for working on this.

@houshengbo

Copy link
Copy Markdown
Contributor

/test pull-knative-operator-serving-upgrade-tests

1 similar comment
@houshengbo

Copy link
Copy Markdown
Contributor

/test pull-knative-operator-serving-upgrade-tests

@houshengbo

Copy link
Copy Markdown
Contributor

/test pull-knative-operator-eventing-upgrade-tests

@houshengbo houshengbo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 1, 2021
@knative-prow-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: houshengbo, nak3

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 1, 2021
@knative-prow-robot
knative-prow-robot merged commit 6d93d79 into knative:main Sep 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants