Skip to content
Draft
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions assets/common/sidecars/controller_driver_kube_rbac_proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
template:
spec:
containers:
- name: kube-rbac-proxy-${LOCAL_METRICS_PORT}
- name: driver-kube-rbac-proxy
args:
- --secure-listen-address=0.0.0.0:${EXPOSED_METRICS_PORT}
- --upstream=http://127.0.0.1:${LOCAL_METRICS_PORT}/
Expand All @@ -19,7 +19,7 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: ${EXPOSED_METRICS_PORT}
name: ${PORT_NAME}
name: driver-m
protocol: TCP
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions assets/common/sidecars/node_driver_kube_rbac_proxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
template:
spec:
containers:
- name: kube-rbac-proxy-${LOCAL_METRICS_PORT}
- name: driver-kube-rbac-proxy
args:
- --secure-listen-address=0.0.0.0:${EXPOSED_METRICS_PORT}
- --upstream=http://127.0.0.1:${LOCAL_METRICS_PORT}/
Expand All @@ -19,7 +19,7 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: ${EXPOSED_METRICS_PORT}
name: ${PORT_NAME}
name: driver-m
protocol: TCP
resources:
requests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8201
name: driver-kube-rbac-proxy
ports:
- containerPort: 9201
name: driver-m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8201
name: driver-kube-rbac-proxy
ports:
- containerPort: 9201
name: driver-m
Expand Down
2 changes: 1 addition & 1 deletion assets/overlays/aws-ebs/patches/controller_add_driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ spec:
- --endpoint=$(CSI_ENDPOINT)
- --k8s-tag-cluster-id=${CLUSTER_ID}
- --logtostderr
- --http-endpoint=localhost:8201
- --http-endpoint=localhost:${DRIVER_METRICS_PORT}
- --v=${LOG_LEVEL}
- --batching=true
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8201
name: driver-kube-rbac-proxy
ports:
- containerPort: 9201
name: driver-m
Expand Down
2 changes: 1 addition & 1 deletion assets/overlays/azure-disk/generated/hypershift/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8206
name: driver-kube-rbac-proxy
ports:
- containerPort: 9206
name: driver-m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8201
name: driver-kube-rbac-proxy
ports:
- containerPort: 9201
name: driver-m
Expand Down
2 changes: 1 addition & 1 deletion assets/overlays/azure-disk/generated/standalone/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8206
name: driver-kube-rbac-proxy
ports:
- containerPort: 9206
name: driver-m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
args:
- --endpoint=$(CSI_ENDPOINT)
- --logtostderr
- --metrics-address=localhost:8201
- --metrics-address=localhost:${DRIVER_METRICS_PORT}
- --v=${LOG_LEVEL}
# Use credentials provided by the azure-inject-credentials container
- --cloud-config-secret-name=""
Expand Down
2 changes: 1 addition & 1 deletion assets/overlays/azure-disk/patches/node_add_driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
- --logtostderr
- --v=${LOG_LEVEL}
- --nodeid=$(KUBE_NODE_NAME)
- --metrics-address=localhost:8206
- --metrics-address=localhost:${DRIVER_METRICS_PORT}
# Use credentials provided by the azure-inject-credentials container
- --cloud-config-secret-name=""
- --cloud-config-secret-namespace=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8211
name: driver-kube-rbac-proxy
ports:
- containerPort: 9211
name: driver-m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8211
name: driver-kube-rbac-proxy
ports:
- containerPort: 9211
name: driver-m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
- --enable-vhd=false
- --endpoint=$(CSI_ENDPOINT)
- --logtostderr
- --metrics-address=localhost:8211
- --metrics-address=localhost:${DRIVER_METRICS_PORT}
- --v=${LOG_LEVEL}
# Use credentials provided by the azure-inject-credentials container
- --cloud-config-secret-name=""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8202
name: driver-kube-rbac-proxy
ports:
- containerPort: 9202
name: driver-m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8202
name: driver-kube-rbac-proxy
ports:
- containerPort: 9202
name: driver-m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ spec:
imagePullPolicy: IfNotPresent
args:
- /bin/cinder-csi-plugin
- "--provide-controller-service=true"
- "--provide-node-service=false"
- "--endpoint=$(CSI_ENDPOINT)"
# this is the generated value of the LOCAL_METRICS_PORT variable
# we hardcode it because we don't currently support substitution
- "--http-endpoint=localhost:8202"
- "--cloud-config=$(CLOUD_CONFIG)"
- "--cluster=${CLUSTER_ID}"
- "--with-topology=$(ENABLE_TOPOLOGY)"
- "--v=${LOG_LEVEL}"
- --provide-controller-service=true
- --provide-node-service=false
- --endpoint=$(CSI_ENDPOINT)
- --http-endpoint=localhost:${DRIVER_METRICS_PORT}
- --cloud-config=$(CLOUD_CONFIG)
- --cluster=${CLUSTER_ID}
- --with-topology=$(ENABLE_TOPOLOGY)
- --v=${LOG_LEVEL}
env:
- name: CSI_ENDPOINT
value: unix://csi/csi.sock
Expand Down
2 changes: 1 addition & 1 deletion assets/overlays/samba/generated/standalone/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8221
name: driver-kube-rbac-proxy
ports:
- containerPort: 9221
name: driver-m
Expand Down
2 changes: 1 addition & 1 deletion assets/overlays/samba/patches/controller_add_driver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
imagePullPolicy: IfNotPresent
args:
- --endpoint=$(CSI_ENDPOINT)
- --metrics-address=localhost:8221
- --metrics-address=localhost:${DRIVER_METRICS_PORT}
- --v=${LOG_LEVEL}
ports:
- containerPort: 10307
Expand Down
14 changes: 4 additions & 10 deletions pkg/driver/aws-ebs/aws_ebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,10 @@ func GetAWSEBSGeneratorConfig() *generator.CSIDriverGeneratorConfig {
OutputDir: generatedAssetBase,

ControllerConfig: &generator.ControlPlaneConfig{
DeploymentTemplateAssetName: "overlays/aws-ebs/patches/controller_add_driver.yaml",
LivenessProbePort: 10301,
MetricsPorts: []generator.MetricsPort{
{
LocalPort: commongenerator.AWSEBSLoopbackMetricsPortStart,
InjectKubeRBACProxy: true,
ExposedPort: commongenerator.AWSEBSExposedMetricsPortStart,
Name: "driver-m",
},
},
DeploymentTemplateAssetName: "overlays/aws-ebs/patches/controller_add_driver.yaml",
LivenessProbePort: 10301,
LocalMetricsPort: commongenerator.AWSEBSLoopbackMetricsPortStart,
ExposedMetricsPort: commongenerator.AWSEBSExposedMetricsPortStart,
SidecarLocalMetricsPortStart: commongenerator.AWSEBSLoopbackMetricsPortStart + 1,
SidecarExposedMetricsPortStart: commongenerator.AWSEBSExposedMetricsPortStart + 1,
Sidecars: []generator.SidecarConfig{
Expand Down
26 changes: 7 additions & 19 deletions pkg/driver/azure-disk/azure_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,10 @@ func GetAzureDiskGeneratorConfig() *generator.CSIDriverGeneratorConfig {
OutputDir: generatedAssetBase,

ControllerConfig: &generator.ControlPlaneConfig{
DeploymentTemplateAssetName: "overlays/azure-disk/patches/controller_add_driver.yaml",
LivenessProbePort: 10301,
MetricsPorts: []generator.MetricsPort{
{
LocalPort: commongenerator.AzureDiskControllerLoopbackMetricsPortStart,
InjectKubeRBACProxy: true,
ExposedPort: commongenerator.AzureDiskControllerExposedMetricsPortStart,
Name: "driver-m",
},
},
DeploymentTemplateAssetName: "overlays/azure-disk/patches/controller_add_driver.yaml",
LivenessProbePort: 10301,
LocalMetricsPort: commongenerator.AzureDiskControllerLoopbackMetricsPortStart,
ExposedMetricsPort: commongenerator.AzureDiskControllerExposedMetricsPortStart,
SidecarLocalMetricsPortStart: commongenerator.AzureDiskControllerLoopbackMetricsPortStart + 1,
SidecarExposedMetricsPortStart: commongenerator.AzureDiskControllerExposedMetricsPortStart + 1,
Sidecars: []generator.SidecarConfig{
Expand Down Expand Up @@ -122,15 +116,9 @@ func GetAzureDiskGeneratorConfig() *generator.CSIDriverGeneratorConfig {

GuestConfig: &generator.GuestConfig{
DaemonSetTemplateAssetName: "overlays/azure-disk/patches/node_add_driver.yaml",
MetricsPorts: []generator.MetricsPort{
{
LocalPort: commongenerator.AzureDiskNodeLoopbackMetricsPortStart,
ExposedPort: commongenerator.AzureDiskNodeExposedMetricsPortStart,
Name: "driver-m",
InjectKubeRBACProxy: true,
},
},
LivenessProbePort: 10300,
LocalMetricsPort: commongenerator.AzureDiskNodeLoopbackMetricsPortStart,
ExposedMetricsPort: commongenerator.AzureDiskNodeExposedMetricsPortStart,
LivenessProbePort: 10300,
// 10303 port is taken by azurefile stuff and hence we must use 10304 here
NodeRegistrarHealthCheckPort: 10304,
Sidecars: []generator.SidecarConfig{
Expand Down
14 changes: 4 additions & 10 deletions pkg/driver/azure-file/azure_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,10 @@ func GetAzureFileGeneratorConfig() *generator.CSIDriverGeneratorConfig {
OutputDir: generatedAssetBase,

ControllerConfig: &generator.ControlPlaneConfig{
DeploymentTemplateAssetName: "overlays/azure-file/patches/controller_add_driver.yaml",
LivenessProbePort: 10303,
MetricsPorts: []generator.MetricsPort{
{
LocalPort: commongenerator.AzureFileLoopbackMetricsPortStart,
InjectKubeRBACProxy: true,
ExposedPort: commongenerator.AzureFileExposedMetricsPortStart,
Name: "driver-m",
},
},
DeploymentTemplateAssetName: "overlays/azure-file/patches/controller_add_driver.yaml",
LivenessProbePort: 10303,
LocalMetricsPort: commongenerator.AzureFileLoopbackMetricsPortStart,
ExposedMetricsPort: commongenerator.AzureFileExposedMetricsPortStart,
SidecarLocalMetricsPortStart: commongenerator.AzureFileLoopbackMetricsPortStart + 1,
SidecarExposedMetricsPortStart: commongenerator.AzureFileExposedMetricsPortStart + 1,
Sidecars: []generator.SidecarConfig{
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/common/operator/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func Test_WithHyperShiftControlPlaneImages(t *testing.T) {
expectedContainerImages: map[string]string{
"csi-driver": "control_plane_driver_image:1",
"csi-liveness-probe": "control_plane_livenessprobe_image:1",
"kube-rbac-proxy-8201": "control_plane_kube_rbac_proxy_image:1",
"driver-kube-rbac-proxy": "control_plane_kube_rbac_proxy_image:1",
"provisioner-kube-rbac-proxy": "control_plane_kube_rbac_proxy_image:1",
"attacher-kube-rbac-proxy": "control_plane_kube_rbac_proxy_image:1",
"resizer-kube-rbac-proxy": "control_plane_kube_rbac_proxy_image:1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ spec:
- --logtostderr=true
image: ${KUBE_RBAC_PROXY_IMAGE}
imagePullPolicy: IfNotPresent
name: kube-rbac-proxy-8201
name: driver-kube-rbac-proxy
ports:
- containerPort: 9201
name: driver-m
Expand Down Expand Up @@ -273,7 +273,7 @@ spec:
name: metrics-serving-cert
- args:
- --csi-address=/var/lib/csi/sockets/pluginproxy/csi.sock
- --metrics-address=localhost:8206
- --metrics-address=localhost:${DRIVER_METRICS_PORT}
- --leader-election
- --leader-election-lease-duration=${LEADER_ELECTION_LEASE_DURATION}
- --leader-election-renew-deadline=${LEADER_ELECTION_RENEW_DEADLINE}
Expand Down
14 changes: 4 additions & 10 deletions pkg/driver/openstack-cinder/openstack_cinder.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,10 @@ func GetOpenStackCinderGeneratorConfig() *generator.CSIDriverGeneratorConfig {
OutputDir: generatedAssetBase,

ControllerConfig: &generator.ControlPlaneConfig{
DeploymentTemplateAssetName: "overlays/openstack-cinder/patches/controller_add_driver.yaml",
LivenessProbePort: 10301,
MetricsPorts: []generator.MetricsPort{
{
LocalPort: commongenerator.OpenStackCinderLoopbackMetricsPortStart,
InjectKubeRBACProxy: true,
ExposedPort: commongenerator.OpenStackCinderExposedMetricsPortStart,
Name: "driver-m",
},
},
DeploymentTemplateAssetName: "overlays/openstack-cinder/patches/controller_add_driver.yaml",
LivenessProbePort: 10301,
LocalMetricsPort: commongenerator.OpenStackCinderLoopbackMetricsPortStart,
ExposedMetricsPort: commongenerator.OpenStackCinderExposedMetricsPortStart,
SidecarLocalMetricsPortStart: commongenerator.OpenStackCinderLoopbackMetricsPortStart + 1,
SidecarExposedMetricsPortStart: commongenerator.OpenStackCinderExposedMetricsPortStart + 1,
Sidecars: []generator.SidecarConfig{
Expand Down
14 changes: 4 additions & 10 deletions pkg/driver/samba/samba.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,10 @@ func GetSambaGeneratorConfig() *generator.CSIDriverGeneratorConfig {
OutputDir: generatedAssetBase,

ControllerConfig: &generator.ControlPlaneConfig{
DeploymentTemplateAssetName: "overlays/samba/patches/controller_add_driver.yaml",
LivenessProbePort: 10307,
MetricsPorts: []generator.MetricsPort{
{
LocalPort: commongenerator.SambaLoopbackMetricsPortStart,
InjectKubeRBACProxy: true,
ExposedPort: commongenerator.SambaExposedMetricsPortStart,
Name: "driver-m",
},
},
DeploymentTemplateAssetName: "overlays/samba/patches/controller_add_driver.yaml",
LivenessProbePort: 10307,
LocalMetricsPort: commongenerator.SambaLoopbackMetricsPortStart,
ExposedMetricsPort: commongenerator.SambaExposedMetricsPortStart,
SidecarLocalMetricsPortStart: commongenerator.SambaLoopbackMetricsPortStart + 1,
SidecarExposedMetricsPortStart: commongenerator.SambaExposedMetricsPortStart + 1,
Sidecars: []generator.SidecarConfig{
Expand Down
Loading