mirror of https://github.com/kubernetes/kops.git
add csi cinder metrics
This commit is contained in:
parent
2ef477f190
commit
c09b401b38
|
@ -444,6 +444,8 @@ spec:
|
||||||
type: boolean
|
type: boolean
|
||||||
ignore-volume-microversion:
|
ignore-volume-microversion:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
metricsEnabled:
|
||||||
|
type: boolean
|
||||||
override-volume-az:
|
override-volume-az:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
|
|
@ -788,6 +788,7 @@ type OpenstackBlockStorageConfig struct {
|
||||||
IgnoreAZ *bool `json:"ignore-volume-az,omitempty"`
|
IgnoreAZ *bool `json:"ignore-volume-az,omitempty"`
|
||||||
OverrideAZ *string `json:"override-volume-az,omitempty"`
|
OverrideAZ *string `json:"override-volume-az,omitempty"`
|
||||||
IgnoreVolumeMicroVersion *bool `json:"ignore-volume-microversion,omitempty"`
|
IgnoreVolumeMicroVersion *bool `json:"ignore-volume-microversion,omitempty"`
|
||||||
|
MetricsEnabled *bool `json:"metricsEnabled,omitempty"`
|
||||||
// CreateStorageClass provisions a default class for the Cinder plugin
|
// CreateStorageClass provisions a default class for the Cinder plugin
|
||||||
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
|
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
|
||||||
CSIPluginImage string `json:"csiPluginImage,omitempty"`
|
CSIPluginImage string `json:"csiPluginImage,omitempty"`
|
||||||
|
|
|
@ -794,6 +794,7 @@ type OpenstackBlockStorageConfig struct {
|
||||||
IgnoreAZ *bool `json:"ignore-volume-az,omitempty"`
|
IgnoreAZ *bool `json:"ignore-volume-az,omitempty"`
|
||||||
OverrideAZ *string `json:"override-volume-az,omitempty"`
|
OverrideAZ *string `json:"override-volume-az,omitempty"`
|
||||||
IgnoreVolumeMicroVersion *bool `json:"ignore-volume-microversion,omitempty"`
|
IgnoreVolumeMicroVersion *bool `json:"ignore-volume-microversion,omitempty"`
|
||||||
|
MetricsEnabled *bool `json:"metricsEnabled,omitempty"`
|
||||||
// CreateStorageClass provisions a default class for the Cinder plugin
|
// CreateStorageClass provisions a default class for the Cinder plugin
|
||||||
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
|
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
|
||||||
CSIPluginImage string `json:"csiPluginImage,omitempty"`
|
CSIPluginImage string `json:"csiPluginImage,omitempty"`
|
||||||
|
|
|
@ -785,6 +785,7 @@ type OpenstackBlockStorageConfig struct {
|
||||||
IgnoreAZ *bool `json:"ignore-volume-az,omitempty"`
|
IgnoreAZ *bool `json:"ignore-volume-az,omitempty"`
|
||||||
OverrideAZ *string `json:"override-volume-az,omitempty"`
|
OverrideAZ *string `json:"override-volume-az,omitempty"`
|
||||||
IgnoreVolumeMicroVersion *bool `json:"ignore-volume-microversion,omitempty"`
|
IgnoreVolumeMicroVersion *bool `json:"ignore-volume-microversion,omitempty"`
|
||||||
|
MetricsEnabled *bool `json:"metricsEnabled,omitempty"`
|
||||||
// CreateStorageClass provisions a default class for the Cinder plugin
|
// CreateStorageClass provisions a default class for the Cinder plugin
|
||||||
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
|
CreateStorageClass *bool `json:"createStorageClass,omitempty"`
|
||||||
CSIPluginImage string `json:"csiPluginImage,omitempty"`
|
CSIPluginImage string `json:"csiPluginImage,omitempty"`
|
||||||
|
|
|
@ -361,6 +361,20 @@ func (b *FirewallModelBuilder) addNodeExporterAndOccmRules(c *fi.CloudupModelBui
|
||||||
PortRangeMax: i(10258),
|
PortRangeMax: i(10258),
|
||||||
}
|
}
|
||||||
b.addDirectionalGroupRule(c, masterSG, nodeSG, occmMetrics)
|
b.addDirectionalGroupRule(c, masterSG, nodeSG, occmMetrics)
|
||||||
|
|
||||||
|
if fi.ValueOf(b.Cluster.Spec.CloudProvider.Openstack.BlockStorage.MetricsEnabled) {
|
||||||
|
csiMetrics := &openstacktasks.SecurityGroupRule{
|
||||||
|
Lifecycle: b.Lifecycle,
|
||||||
|
Direction: s(string(rules.DirIngress)),
|
||||||
|
Protocol: s(IPProtocolTCP),
|
||||||
|
EtherType: s(IPV4),
|
||||||
|
PortRangeMin: i(9809),
|
||||||
|
PortRangeMax: i(9809),
|
||||||
|
}
|
||||||
|
// allow 9809 port from nodeSG & masterSG
|
||||||
|
b.addDirectionalGroupRule(c, masterSG, nodeSG, csiMetrics)
|
||||||
|
b.addDirectionalGroupRule(c, nodeSG, nodeSG, csiMetrics)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ spec:
|
||||||
serviceAccount: csi-cinder-controller-sa
|
serviceAccount: csi-cinder-controller-sa
|
||||||
containers:
|
containers:
|
||||||
- name: csi-attacher
|
- name: csi-attacher
|
||||||
image: registry.k8s.io/sig-storage/csi-attacher:v3.4.0
|
image: registry.k8s.io/sig-storage/csi-attacher:v4.2.0
|
||||||
args:
|
args:
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
- "--timeout=3m"
|
- "--timeout=3m"
|
||||||
|
@ -263,7 +263,7 @@ spec:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||||
- name: csi-provisioner
|
- name: csi-provisioner
|
||||||
image: registry.k8s.io/sig-storage/csi-provisioner:v3.1.0
|
image: registry.k8s.io/sig-storage/csi-provisioner:v3.4.1
|
||||||
args:
|
args:
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
- "--timeout=3m"
|
- "--timeout=3m"
|
||||||
|
@ -282,7 +282,7 @@ spec:
|
||||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||||
{{ if HasSnapshotController }}
|
{{ if HasSnapshotController }}
|
||||||
- name: csi-snapshotter
|
- name: csi-snapshotter
|
||||||
image: registry.k8s.io/sig-storage/csi-snapshotter:v5.0.1
|
image: registry.k8s.io/sig-storage/csi-snapshotter:v6.2.1
|
||||||
args:
|
args:
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
- "--timeout=3m"
|
- "--timeout=3m"
|
||||||
|
@ -297,7 +297,7 @@ spec:
|
||||||
name: socket-dir
|
name: socket-dir
|
||||||
{{ end }}
|
{{ end }}
|
||||||
- name: csi-resizer
|
- name: csi-resizer
|
||||||
image: registry.k8s.io/sig-storage/csi-resizer:v1.4.0
|
image: registry.k8s.io/sig-storage/csi-resizer:v1.7.0
|
||||||
args:
|
args:
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
- "--timeout=3m"
|
- "--timeout=3m"
|
||||||
|
@ -311,7 +311,7 @@ spec:
|
||||||
- name: socket-dir
|
- name: socket-dir
|
||||||
mountPath: /var/lib/csi/sockets/pluginproxy/
|
mountPath: /var/lib/csi/sockets/pluginproxy/
|
||||||
- name: liveness-probe
|
- name: liveness-probe
|
||||||
image: registry.k8s.io/sig-storage/livenessprobe:v2.6.0
|
image: registry.k8s.io/sig-storage/livenessprobe:v2.9.0
|
||||||
args:
|
args:
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
env:
|
env:
|
||||||
|
@ -327,6 +327,9 @@ spec:
|
||||||
- "--endpoint=$(CSI_ENDPOINT)"
|
- "--endpoint=$(CSI_ENDPOINT)"
|
||||||
- "--cloud-config=$(CLOUD_CONFIG)"
|
- "--cloud-config=$(CLOUD_CONFIG)"
|
||||||
- "--cluster=$(CLUSTER_NAME)"
|
- "--cluster=$(CLUSTER_NAME)"
|
||||||
|
{{- if WithDefaultBool .CloudProvider.Openstack.BlockStorage.MetricsEnabled false }}
|
||||||
|
- "--http-endpoint=:9809"
|
||||||
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
value: unix://csi/csi.sock
|
value: unix://csi/csi.sock
|
||||||
|
@ -339,6 +342,11 @@ spec:
|
||||||
- containerPort: 9808
|
- containerPort: 9808
|
||||||
name: healthz
|
name: healthz
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
{{- if WithDefaultBool .CloudProvider.Openstack.BlockStorage.MetricsEnabled false }}
|
||||||
|
- containerPort: 9809
|
||||||
|
name: metrics
|
||||||
|
protocol: TCP
|
||||||
|
{{- end }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
failureThreshold: 5
|
failureThreshold: 5
|
||||||
httpGet:
|
httpGet:
|
||||||
|
@ -426,7 +434,7 @@ spec:
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
containers:
|
containers:
|
||||||
- name: node-driver-registrar
|
- name: node-driver-registrar
|
||||||
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.5.0
|
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.6.3
|
||||||
args:
|
args:
|
||||||
- "--csi-address=$(ADDRESS)"
|
- "--csi-address=$(ADDRESS)"
|
||||||
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
|
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
|
||||||
|
@ -446,7 +454,7 @@ spec:
|
||||||
- name: registration-dir
|
- name: registration-dir
|
||||||
mountPath: /registration
|
mountPath: /registration
|
||||||
- name: liveness-probe
|
- name: liveness-probe
|
||||||
image: registry.k8s.io/sig-storage/livenessprobe:v2.6.0
|
image: registry.k8s.io/sig-storage/livenessprobe:v2.9.0
|
||||||
args:
|
args:
|
||||||
- --csi-address=/csi/csi.sock
|
- --csi-address=/csi/csi.sock
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
|
@ -467,6 +475,9 @@ spec:
|
||||||
- "--cloud-config=$(CLOUD_CONFIG)"
|
- "--cloud-config=$(CLOUD_CONFIG)"
|
||||||
{{- if .CloudProvider.Openstack.BlockStorage.ClusterName }}
|
{{- if .CloudProvider.Openstack.BlockStorage.ClusterName }}
|
||||||
- "--cluster=$(CLUSTER_NAME)"
|
- "--cluster=$(CLUSTER_NAME)"
|
||||||
|
{{- end }}
|
||||||
|
{{- if WithDefaultBool .CloudProvider.Openstack.BlockStorage.MetricsEnabled false }}
|
||||||
|
- "--http-endpoint=:9809"
|
||||||
{{- end }}
|
{{- end }}
|
||||||
env:
|
env:
|
||||||
- name: CSI_ENDPOINT
|
- name: CSI_ENDPOINT
|
||||||
|
@ -482,6 +493,11 @@ spec:
|
||||||
- containerPort: 9808
|
- containerPort: 9808
|
||||||
name: healthz
|
name: healthz
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
{{- if WithDefaultBool .CloudProvider.Openstack.BlockStorage.MetricsEnabled false }}
|
||||||
|
- containerPort: 9809
|
||||||
|
name: metrics
|
||||||
|
protocol: TCP
|
||||||
|
{{- end }}
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
failureThreshold: 5
|
failureThreshold: 5
|
||||||
httpGet:
|
httpGet:
|
||||||
|
|
Loading…
Reference in New Issue