Skip to content

Commit

Permalink
gomod: update nginx-operator to v0.9.1 - add toleration support
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheu committed Feb 16, 2022
1 parent 4ae3829 commit 68f8a4e
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 67 deletions.
43 changes: 43 additions & 0 deletions config/crd/bases/extensions.tsuru.io_rpaasflavors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2935,6 +2935,49 @@ spec:
value.
format: int64
type: integer
toleration:
description: Toletarion defines list of taints that pod can
tolerate.
items:
description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using
the matching operator <operator>.
properties:
effect:
description: Effect indicates the taint effect to match.
Empty means match all taint effects. When specified,
allowed values are NoSchedule, PreferNoSchedule and
NoExecute.
type: string
key:
description: Key is the taint key that the toleration
applies to. Empty means match all taint keys. If the
key is empty, operator must be Exists; this combination
means to match all values and all keys.
type: string
operator:
description: Operator represents a key's relationship
to the value. Valid operators are Exists and Equal.
Defaults to Equal. Exists is equivalent to wildcard
for value, so that a pod can tolerate all taints of
a particular category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the period
of time the toleration (which must be of effect NoExecute,
otherwise this field is ignored) tolerates the taint.
By default, it is not set, which means tolerate the
taint forever (do not evict). Zero and negative values
will be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration
matches to. If the operator is Exists, the value should
be empty, otherwise just a regular string.
type: string
type: object
type: array
volumeMounts:
description: VolumeMounts will mount volume declared above
in directories
Expand Down
41 changes: 41 additions & 0 deletions config/crd/bases/extensions.tsuru.io_rpaasinstances.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2818,6 +2818,47 @@ spec:
to pod's terminationGracePeriodSeconds default value.
format: int64
type: integer
toleration:
description: Toletarion defines list of taints that pod can tolerate.
items:
description: The pod this Toleration is attached to tolerates
any taint that matches the triple <key,value,effect> using
the matching operator <operator>.
properties:
effect:
description: Effect indicates the taint effect to match.
Empty means match all taint effects. When specified, allowed
values are NoSchedule, PreferNoSchedule and NoExecute.
type: string
key:
description: Key is the taint key that the toleration applies
to. Empty means match all taint keys. If the key is empty,
operator must be Exists; this combination means to match
all values and all keys.
type: string
operator:
description: Operator represents a key's relationship to
the value. Valid operators are Exists and Equal. Defaults
to Equal. Exists is equivalent to wildcard for value,
so that a pod can tolerate all taints of a particular
category.
type: string
tolerationSeconds:
description: TolerationSeconds represents the period of
time the toleration (which must be of effect NoExecute,
otherwise this field is ignored) tolerates the taint.
By default, it is not set, which means tolerate the taint
forever (do not evict). Zero and negative values will
be treated as 0 (evict immediately) by the system.
format: int64
type: integer
value:
description: Value is the taint value the toleration matches
to. If the operator is Exists, the value should be empty,
otherwise just a regular string.
type: string
type: object
type: array
volumeMounts:
description: VolumeMounts will mount volume declared above in
directories
Expand Down
8 changes: 8 additions & 0 deletions controllers/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,10 @@ func TestReconcileRpaasInstance_getRpaasInstance(t *testing.T) {
},
},
PodTemplate: nginxv1alpha1.NginxPodTemplateSpec{
Toleration: []corev1.Toleration{{
Key: "mango-toleration",
Operator: corev1.TolerationOpExists,
}},
Annotations: map[string]string{
"mango-pod-annotation": "mango",
},
Expand Down Expand Up @@ -574,6 +578,10 @@ func TestReconcileRpaasInstance_getRpaasInstance(t *testing.T) {
},
},
PodTemplate: nginxv1alpha1.NginxPodTemplateSpec{
Toleration: []corev1.Toleration{{
Key: "mango-toleration",
Operator: corev1.TolerationOpExists,
}},
Annotations: map[string]string{
"default-pod-annotation": "default",
"flavored-pod-annotation": "v1",
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/Masterminds/sprig/v3 v3.1.0
github.com/ajg/form v1.5.1
github.com/davecgh/go-spew v1.1.1
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7
github.com/evanphx/json-patch/v5 v5.1.0
github.com/fatih/color v1.13.0
github.com/fsnotify/fsnotify v1.5.1
Expand All @@ -17,7 +16,6 @@ require (
github.com/google/gops v0.3.12
github.com/gorilla/websocket v1.4.2
github.com/hashicorp/go-multierror v1.1.0
github.com/heroku/docker-registry-client v0.0.0-20190909225348-afc9e1acc3d5
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12
github.com/jetstack/cert-manager v1.4.0
Expand All @@ -33,7 +31,7 @@ require (
github.com/spf13/viper v1.10.0
github.com/stern/stern v1.20.1
github.com/stretchr/testify v1.7.0
github.com/tsuru/nginx-operator v0.9.0
github.com/tsuru/nginx-operator v0.9.1
github.com/uber/jaeger-client-go v2.25.0+incompatible
github.com/uber/jaeger-lib v2.4.0+incompatible // indirect
github.com/urfave/cli/v2 v2.1.1
Expand Down
Loading

0 comments on commit 68f8a4e

Please sign in to comment.