Skip to content

Commit

Permalink
Merge pull request #294 from shiftstack/configure-namespace
Browse files Browse the repository at this point in the history
OSASINFRA-3628: Make guest namespace configurable
  • Loading branch information
openshift-merge-bot[bot] authored Oct 18, 2024
2 parents 7280bd6 + 4182cd3 commit 8f8d508
Show file tree
Hide file tree
Showing 150 changed files with 295 additions and 203 deletions.
2 changes: 1 addition & 1 deletion assets/base/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: ${ASSET_PREFIX}-node
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
spec:
selector:
matchLabels:
Expand Down
2 changes: 1 addition & 1 deletion assets/base/node_metrics_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
labels:
app: ${ASSET_PREFIX}-node-metrics
name: ${ASSET_PREFIX}-node-metrics
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
spec:
ports:
selector:
Expand Down
2 changes: 1 addition & 1 deletion assets/base/node_metrics_servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: ${ASSET_PREFIX}-node-monitor
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
spec:
# Empty list to make json-patch work
endpoints: []
Expand Down
2 changes: 1 addition & 1 deletion assets/base/node_sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: ${ASSET_PREFIX}-node-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
4 changes: 2 additions & 2 deletions assets/base/rbac/lease_leader_election_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ${ASSET_PREFIX}-lease-leader-election
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: ${ASSET_PREFIX}-lease-leader-election
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
2 changes: 1 addition & 1 deletion assets/base/rbac/lease_leader_election_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ${ASSET_PREFIX}-lease-leader-election
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/main_attacher_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
kind: ClusterRole
name: openshift-csi-main-attacher-role
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/main_provisioner_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
kind: ClusterRole
name: openshift-csi-main-provisioner-role
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/main_resizer_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
kind: ClusterRole
name: openshift-csi-main-resizer-role
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/main_snapshotter_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
kind: ClusterRole
name: openshift-csi-main-snapshotter-role
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/node_kube_rbac_proxy_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-node-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
kind: ClusterRole
name: ${ASSET_SHORT_PREFIX}-node-kube-rbac-proxy-role
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/node_privileged_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-node-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
kind: ClusterRole
name: ${ASSET_SHORT_PREFIX}-privileged-role
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/prometheus_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: ${ASSET_PREFIX}-prometheus
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/prometheus_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: ${ASSET_PREFIX}-prometheus
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
rules:
- apiGroups:
- ""
Expand Down
2 changes: 1 addition & 1 deletion assets/base/rbac/storageclass_reader_resizer_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
kind: ClusterRole
name: openshift-csi-resizer-storageclass-reader-role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ${ASSET_PREFIX}-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
kind: ClusterRole
name: openshift-csi-provisioner-volumesnapshot-reader-role
Expand Down
2 changes: 1 addition & 1 deletion assets/common/sidecars/attacher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
# Empty env. instead of nil for json patch to append new env. vars there
env: []
Expand Down
2 changes: 1 addition & 1 deletion assets/common/sidecars/provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
# Empty env. instead of nil for json patch to append new env. vars there
env: []
Expand Down
2 changes: 1 addition & 1 deletion assets/common/sidecars/resizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
# Empty env. instead of nil for json patch to append new env. vars there
env: []
Expand Down
2 changes: 1 addition & 1 deletion assets/common/sidecars/snapshotter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
# Empty env. instead of nil for json patch to append new env. vars there
env: []
Expand Down
8 changes: 4 additions & 4 deletions assets/overlays/aws-ebs/generated/hypershift/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
- --default-fstype=ext4
- --feature-gates=Topology=true
Expand Down Expand Up @@ -222,7 +222,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
- --timeout=60s
- --kube-api-qps=20
Expand Down Expand Up @@ -276,7 +276,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
- --timeout=60s
- --kube-api-qps=20
Expand Down Expand Up @@ -330,7 +330,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
- --extra-create-metadata
- --kube-api-qps=20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: aws-ebs-csi-driver-lease-leader-election
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: aws-ebs-csi-driver-lease-leader-election
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: aws-ebs-csi-driver-lease-leader-election
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
rules:
- apiGroups:
- coordination.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
2 changes: 1 addition & 1 deletion assets/overlays/aws-ebs/generated/hypershift/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:
config.openshift.io/inject-proxy: csi-driver
config.openshift.io/inject-proxy-cabundle: csi-driver
name: aws-ebs-csi-driver-node
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
spec:
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-node-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
2 changes: 1 addition & 1 deletion assets/overlays/aws-ebs/generated/hypershift/node_sa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: aws-ebs-csi-driver-node-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
8 changes: 4 additions & 4 deletions assets/overlays/aws-ebs/generated/standalone/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
- --default-fstype=ext4
- --feature-gates=Topology=true
Expand Down Expand Up @@ -186,7 +186,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
- --timeout=60s
- --kube-api-qps=20
Expand Down Expand Up @@ -234,7 +234,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
- --timeout=60s
- --kube-api-qps=20
Expand Down Expand Up @@ -282,7 +282,7 @@ spec:
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
- --leader-election-retry-period=${LEADER_ELECTION_RETRY_PERIOD}
- --leader-election-namespace=openshift-cluster-csi-drivers
- --leader-election-namespace=${NODE_NAMESPACE}
- --v=${LOG_LEVEL}
- --extra-create-metadata
- --kube-api-qps=20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: aws-ebs-csi-driver-lease-leader-election
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: aws-ebs-csi-driver-lease-leader-election
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: aws-ebs-csi-driver-lease-leader-election
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
rules:
- apiGroups:
- coordination.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
2 changes: 1 addition & 1 deletion assets/overlays/aws-ebs/generated/standalone/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ metadata:
config.openshift.io/inject-proxy: csi-driver
config.openshift.io/inject-proxy-cabundle: csi-driver
name: aws-ebs-csi-driver-node
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
spec:
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: aws-ebs-csi-driver-node-sa
namespace: openshift-cluster-csi-drivers
namespace: ${NODE_NAMESPACE}
Loading

0 comments on commit 8f8d508

Please sign in to comment.