Skip to content

Commit

Permalink
Exclude openebs namespace from injection. (#1869)
Browse files Browse the repository at this point in the history
* Exclude openebs namespace from injection.

OpenEBS is a Kubernetes storage solution. When you spin up a PVC, under
the hood OpenEBS creates a pod to handle the necessary storage
operations. If the openebs namespace is not excluded from injection,
that pod can't start because our mutatingwebhook config requires all pod
scheduling requests make it to our webhook and our webhook isn't running
yet because the consul servers aren't running.

This is a breaking change but I think it's worth it because it's very
unlikely anyone is using the openebs namespace for anything other than
openebs.

* Changelog
  • Loading branch information
lkysow authored and thisisnotashwin committed Feb 2, 2023
1 parent 4528bd0 commit ada739f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
## UNRELEASED

BREAKING CHANGES:
* Helm:
* Change defaults to exclude the `openebs` namespace from sidecar injection. If you previously had pods in that namespace
that you wanted to be injected, you must now set `namespaceSelector` as follows:

```yaml
connectInject:
namespaceSelector: |
matchExpressions:
- key: "kubernetes.io/metadata.name"
operator: "NotIn"
values: ["kube-system","local-path-storage"]
```
[[GH-1869](https://github.com/hashicorp/consul-k8s/pull/1869)]
## 1.0.3 (January 30, 2023)
IMPROVEMENTS:
Expand Down
8 changes: 4 additions & 4 deletions charts/consul/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2165,9 +2165,9 @@ connectInject:
# See https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#matching-requests-namespaceselector
# for more details.
#
# By default, we exclude the kube-system namespace since usually users won't
# want those pods injected and also the local-path-storage namespace so that
# Kind (Kubernetes In Docker) can provision Pods used to create PVCs.
# By default, we exclude kube-system since usually users won't
# want those pods injected and local-path-storage and openebs so that
# Kind (Kubernetes In Docker) and OpenEBS (https://openebs.io/) respectively can provision Pods used to create PVCs.
# Note that this exclusion is only supported in Kubernetes v1.21.1+.
#
# Example:
Expand All @@ -2182,7 +2182,7 @@ connectInject:
matchExpressions:
- key: "kubernetes.io/metadata.name"
operator: "NotIn"
values: ["kube-system","local-path-storage"]
values: ["kube-system","local-path-storage","openebs"]
# List of k8s namespaces to allow Connect sidecar
# injection in. If a k8s namespace is not included or is listed in `k8sDenyNamespaces`,
Expand Down

0 comments on commit ada739f

Please sign in to comment.