Skip to content

Commit

Permalink
Remove omitWebhookSideEffects flag/setting (linkerd#6942)
Browse files Browse the repository at this point in the history
* Remove `omitWebhookSideEffects` flag/setting

This was introduced back in linkerd#2963 to support k8s with versions before 1.12 that didn't support the `sideEffects` property in webhooks. It's been a while we no longer support 1.12, so we can safely drop this.
  • Loading branch information
alpeb authored Sep 22, 2021
1 parent cbacb54 commit 90f8c9d
Show file tree
Hide file tree
Showing 28 changed files with 136 additions and 174 deletions.
1 change: 0 additions & 1 deletion charts/linkerd2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ Kubernetes: `>=1.16.0-0`
| linkerdVersion | string | `"linkerdVersionValue"` | control plane version. See Proxy section for proxy version |
| namespace | string | `"linkerd"` | Control plane namespace |
| nodeSelector | object | `{"beta.kubernetes.io/os":"linux"}` | NodeSelector section, See the [K8S documentation](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) for more information |
| omitWebhookSideEffects | bool | `false` | Omit the `sideEffects` flag in the webhook manifests |
| podAnnotations | object | `{}` | Additional annotations to add to all pods |
| podLabels | object | `{}` | Additional labels to add to all pods |
| policyController.defaultAllowPolicy | string | "all-unauthenticated" | The default allow policy to use when no `Server` selects a pod. One of: "all-authenticated", "all-unauthenticated", "cluster-authenticated", "cluster-unauthenticated", "deny" |
Expand Down
4 changes: 0 additions & 4 deletions charts/linkerd2/templates/destination-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ webhooks:
apiGroups: ["linkerd.io"]
apiVersions: ["v1alpha1", "v1alpha2"]
resources: ["serviceprofiles"]
{{- if not .Values.omitWebhookSideEffects }}
sideEffects: None
{{- end }}
---
{{- $host := printf "linkerd-policy-validator.%s.svc" .Values.namespace }}
{{- $ca := genSelfSignedCert $host (list) (list $host) 365 }}
Expand Down Expand Up @@ -153,9 +151,7 @@ webhooks:
apiGroups: ["policy.linkerd.io"]
apiVersions: ["v1alpha1"]
resources: ["servers"]
{{- if not .Values.omitWebhookSideEffects }}
sideEffects: None
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
2 changes: 0 additions & 2 deletions charts/linkerd2/templates/proxy-injector-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,4 @@ webhooks:
apiGroups: [""]
apiVersions: ["v1"]
resources: ["pods", "services"]
{{- if not .Values.omitWebhookSideEffects }}
sideEffects: None
{{- end }}
2 changes: 0 additions & 2 deletions charts/linkerd2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ enableH2Upgrade: true
# PSP has been deprecated since k8s v1.21
enablePSP: false

# -- Omit the `sideEffects` flag in the webhook manifests
omitWebhookSideEffects: false
# -- Failure policy for the proxy injector
webhookFailurePolicy: Ignore

Expand Down
1 change: 0 additions & 1 deletion cli/cmd/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func TestRender(t *testing.T) {
ControllerUID: 2103,
EnableH2Upgrade: true,
WebhookFailurePolicy: "WebhookFailurePolicy",
OmitWebhookSideEffects: false,
HeartbeatSchedule: "1 2 3 4 5",
InstallNamespace: true,
Identity: defaultValues.Identity,
Expand Down
7 changes: 0 additions & 7 deletions cli/cmd/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ func makeInstallUpgradeFlags(defaults *l5dcharts.Values) ([]flag.Flag, *pflag.Fl
return nil
}),

flag.NewBoolFlag(installUpgradeFlags, "omit-webhook-side-effects", defaults.OmitWebhookSideEffects,
"Omit the sideEffects flag in the webhook manifests, This flag must be provided during install or upgrade for Kubernetes versions pre 1.12",
func(values *l5dcharts.Values, value bool) error {
values.OmitWebhookSideEffects = value
return nil
}),

flag.NewBoolFlag(installUpgradeFlags, "control-plane-tracing", defaults.ControlPlaneTracing,
"Enables Control Plane Tracing with the defaults", func(values *l5dcharts.Values, value bool) error {
values.ControlPlaneTracing = value
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_custom_domain.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_custom_registry.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_default.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_ha_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_ha_with_overrides_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_heartbeat_disabled_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_helm_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_helm_output_ha.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_helm_output_ha_labels.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_no_init_container.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_output.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_proxy_ignores.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion cli/cmd/testdata/install_values_file.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 90f8c9d

Please sign in to comment.