Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add restrict_kubeapi flag #110

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,16 @@ Issuer URL )# where ( Issuer URL ) is the value of --oidc-issuer-url. The value
description: "Prefix prepended to group claims to prevent clashes
with existing names (such as system: groups). For example, the value oidc: will
create group names like oidc:engineering and oidc:infra."
- name: restrict_kubeapi
required: false
schema:
openAPIV3Schema:
type: array
default: []
example: ["10.6.0.0/24"]
description: "Allows restricting access to kubernetes API by list of CIDRs. Empty list (default) means public, [ 'none' ] means internal access only."
items:
type: string
patches:
- name: k8s_version
description: "Sets the openstack node image for workers and the controlplane to the cluster-api image with the version mentioned in spec.topology.version."
Expand Down Expand Up @@ -536,3 +546,16 @@ create group names like oidc:engineering and oidc:infra."
path: "/spec/template/spec/kubeadmConfigSpec/clusterConfiguration/apiServer/extraArgs/oidc-groups-prefix"
valueFrom:
variable: oidc_config.groups_prefix
- name: restrict_kubeapi
description: "Sets list of CIDRS for restricting access to kubernetes API"
enabledIf: {{ `"{{ if .restrict_kubeapi }}true{{end}}"` }}
definitions:
- selector:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: OpenStackClusterTemplate
matchResources:
controlPlane: true
jsonPatches:
- op: replace
path: "/spec/template/spec/apiServerLoadBalancer/allowedCIDRs"
value: restrict_kubeapi
Loading