Skip to content

Commit

Permalink
Remove PersistentVolumeLabel from enabled admission-plugins (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
addyess authored Aug 5, 2024
1 parent 793d7c2 commit cf6c1a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions charms/kubernetes_snaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ def configure_apiserver(
#
# The list below need only include the plugins we want to enable
# in addition to the defaults.
admission_plugins = [
"PersistentVolumeLabel",
"NodeRestriction",
]
#
# In 1.31, PersistentVolumeLabel was no longer available as an admission plugin
# https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers

admission_plugins = ["NodeRestriction"]

authorization_modes = authorization_mode.split(",")
has_authz_webhook = "Webhook" in authorization_modes
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_kubernetes_snaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def test_configure_apiserver(mock_path, configure_kubernetes_service, external_c
"etcd-certfile": "/root/cdk/etcd/client-cert.pem",
"etcd-servers": "https://1.1.1.1,https://1.1.1.2",
"authorization-mode": "Node,RBAC",
"enable-admission-plugins": "PersistentVolumeLabel,NodeRestriction",
"enable-admission-plugins": "NodeRestriction",
"requestheader-client-ca-file": "/root/cdk/ca.crt",
"requestheader-allowed-names": "system:kube-apiserver,client",
"requestheader-extra-headers-prefix": "X-Remote-Extra-",
Expand Down

0 comments on commit cf6c1a5

Please sign in to comment.