Skip to content

Commit 22bb44d

Browse files
committed
Merge remote-tracking branch 'k8s/master' into sync-master
2 parents 90be109 + 43b55ba commit 22bb44d

File tree

38 files changed

+355
-153
lines changed

38 files changed

+355
-153
lines changed

Dockerfile

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,33 @@ CMD ["sh", "-c", "/bin/barbican-kms-plugin --socketpath ${socketpath} --cloud-co
106106
##
107107
## cinder-csi-plugin
108108
##
109-
FROM --platform=${TARGETPLATFORM} ${DEBIAN_IMAGE} as cinder-csi-plugin
110109

111-
# Install e4fsprogs for format
112-
RUN clean-install btrfs-progs e2fsprogs mount udev xfsprogs
110+
# step 1: copy all necessary files from Debian distro to /dest folder
111+
# all magic heppens in tools/csi-deps.sh
112+
FROM --platform=${TARGETPLATFORM} ${DEBIAN_IMAGE} as cinder-csi-plugin-utils
113113

114+
RUN clean-install bash rsync mount udev btrfs-progs e2fsprogs xfsprogs
115+
COPY tools/csi-deps.sh /tools/csi-deps.sh
116+
RUN /tools/csi-deps.sh
117+
118+
# step 2: check if all necessary files are copied and work properly
119+
# the build have to finish without errors, but the result image will not be used
120+
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE} as cinder-csi-plugin-utils-check
121+
122+
COPY --from=cinder-csi-plugin-utils /dest /
123+
COPY --from=cinder-csi-plugin-utils /bin/sh /bin/sh
124+
COPY tools/csi-deps-check.sh /tools/csi-deps-check.sh
125+
126+
SHELL ["/bin/sh"]
127+
RUN /tools/csi-deps-check.sh
128+
129+
# step 3: build tiny cinder-csi-plugin image with only necessary files
130+
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE} as cinder-csi-plugin
131+
132+
# Copying csi-deps-check.sh simply ensures that the resulting image has a dependency
133+
# on cinder-csi-plugin-utils-check and therefore that the check has passed
134+
COPY --from=cinder-csi-plugin-utils-check /tools/csi-deps-check.sh /bin/csi-deps-check.sh
135+
COPY --from=cinder-csi-plugin-utils /dest /
114136
COPY --from=builder /build/cinder-csi-plugin /bin/cinder-csi-plugin
115137
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
116138

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ VERSION ?= $(shell git describe --dirty --tags --match='v*')
3636
GOARCH :=
3737
GOFLAGS :=
3838
TAGS :=
39-
LDFLAGS := "-w -s -X 'k8s.io/component-base/version.gitVersion=$(VERSION)'"
39+
LDFLAGS := "-w -s -X 'k8s.io/component-base/version.gitVersion=$(VERSION)' -X 'k8s.io/cloud-provider-openstack/pkg/version.Version=$(VERSION)'"
4040
GOX_LDFLAGS := $(shell echo "$(LDFLAGS) -extldflags \"-static\"")
4141
REGISTRY ?= registry.k8s.io/provider-os
4242
IMAGE_OS ?= linux

charts/cinder-csi-plugin/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: v1.27.1
33
description: Cinder CSI Chart for OpenStack
44
name: openstack-cinder-csi
5-
version: 2.28.0-alpha.2
5+
version: 2.28.0-alpha.3
66
home: https://github.com/kubernetes/cloud-provider-openstack
77
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
88
maintainers:

charts/cinder-csi-plugin/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ csi:
3030
resizer:
3131
image:
3232
repository: registry.k8s.io/sig-storage/csi-resizer
33-
tag: v1.7.0
33+
tag: v1.8.0
3434
pullPolicy: IfNotPresent
3535
resources: {}
3636
extraArgs: {}

charts/manila-csi-plugin/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: v1.27.1
33
description: Manila CSI Chart for OpenStack
44
name: openstack-manila-csi
5-
version: 2.28.0-alpha.2
5+
version: 2.28.0-alpha.3
66
home: http://github.com/kubernetes/cloud-provider-openstack
77
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
88
maintainers:

charts/manila-csi-plugin/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ controllerplugin:
9292
resizer:
9393
image:
9494
repository: registry.k8s.io/sig-storage/csi-resizer
95-
tag: v1.3.0
95+
tag: v1.8.0
9696
pullPolicy: IfNotPresent
9797
resources: {}
9898
nodeSelector: {}

charts/openstack-cloud-controller-manager/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Openstack Cloud Controller Manager Helm Chart
44
icon: https://object-storage-ca-ymq-1.vexxhost.net/swift/v1/6e4619c416ff4bd19e1c087f27a43eea/www-images-prod/openstack-logo/OpenStack-Logo-Vertical.png
55
home: https://github.com/kubernetes/cloud-provider-openstack
66
name: openstack-cloud-controller-manager
7-
version: 2.28.0-alpha.3
7+
version: 2.28.0-alpha.4
88
maintainers:
99
- name: eumel8
1010

charts/openstack-cloud-controller-manager/templates/daemonset.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,12 @@ spec:
1818
template:
1919
metadata:
2020
annotations:
21-
checksum/config: {{ include "cloudConfig" . | sha256sum }}
22-
labels:
23-
{{- include "occm.controllermanager.labels" . | nindent 8 }}
24-
annotations:
21+
checksum/config: {{ include "cloudConfig" . | sha256sum }}
2522
{{- with .Values.commonAnnotations }}
2623
{{- toYaml . | nindent 8 }}
2724
{{- end }}
25+
labels:
26+
{{- include "occm.controllermanager.labels" . | nindent 8 }}
2827
spec:
2928
{{- with .Values.nodeSelector }}
3029
nodeSelector:

docs/cinder-csi-plugin/using-cinder-csi-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The Cinder CSI Driver is a CSI Specification compliant driver used by Container
3232

3333
## CSI Compatibility
3434

35-
This plugin is compatible with CSI versions v1.3.0, v1.2.0 , v1.1.0, and v1.0.0
35+
This plugin is compatible with CSI v1.8.0
3636

3737
## Downloads
3838

docs/manila-csi-plugin/using-manila-csi-plugin.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Parameter | Required | Description
5050
`type` | _yes_ | Manila [share type](https://wiki.openstack.org/wiki/Manila/Concepts#share_type)
5151
`shareNetworkID` | _no_ | Manila [share network ID](https://wiki.openstack.org/wiki/Manila/Concepts#share_network)
5252
`availability` | _no_ | Manila availability zone of the provisioned share. If none is provided, the default Manila zone will be used. Note that this parameter is opaque to the CO and does not influence placement of workloads that will consume this share, meaning they may be scheduled onto any node of the cluster. If the specified Manila AZ is not equally accessible from all compute nodes of the cluster, use [Topology-aware dynamic provisioning](#topology-aware-dynamic-provisioning).
53+
`autoTopology` | _no_ | When set to "true" and the `availability` parameter is empty, the Manila CSI controller will map the Manila availability zone to the target compute node availability zone.
5354
`appendShareMetadata` | _no_ | Append user-defined metadata to the provisioned share. If not empty, this field must be a string with a valid JSON object. The object must consist of key-value pairs of type string. Example: `"{..., \"key\": \"value\"}"`.
5455
`cephfs-mounter` | _no_ | Relevant for CephFS Manila shares. Specifies which mounting method to use with the CSI CephFS driver. Available options are `kernel` and `fuse`, defaults to `fuse`. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information.
5556
`cephfs-kernelMountOptions` | _no_ | Relevant for CephFS Manila shares. Specifies mount options for CephFS kernel client. See [CSI CephFS docs](https://github.com/ceph/ceph-csi/blob/csi-v1.0/docs/deploy-cephfs.md#configuration) for further information.
@@ -130,6 +131,35 @@ Storage AZ does not influence
130131
Shares in zone-a are accessible only from nodes in nova-1 and nova-2.
131132
```
132133

134+
In cases when the Manila availability zone must correspond to the Nova
135+
availability zone, you can set the `autoTopology: "true"` along with the
136+
`volumeBindingMode: WaitForFirstConsumer` and omit the `availability`
137+
parameter. By doing so, the share will be provisioned in the target compute
138+
node availability zone.
139+
140+
```
141+
Auto topology-aware storage class example:
142+
143+
144+
Both Compute and Storage AZs influence the placement of workloads.
145+
146+
+-----------+ +---------------+
147+
| Manila AZ | | Compute AZs |
148+
| zone-1 | apiVersion: storage.k8s.io/v1 | zone-1 |
149+
| zone-2 | kind: StorageClass | zone-2 |
150+
+-----------+ metadata: +---------------+
151+
| name: nfs-gold |
152+
| provisioner: nfs.manila.csi.openstack.org |
153+
| parameters: |
154+
+---------+ autoTopology: "true" +--------------------+
155+
...
156+
volumeBindingMode: WaitForFirstConsumer
157+
...
158+
159+
Shares for workloads in zone-1 will be created in zone-1 and accessible only from nodes in zone-1.
160+
Shares for workloads in zone-2 will be created in zone-2 and accessible only from nodes in zone-2.
161+
```
162+
133163
[Enabling topology awareness in Kubernetes](#enabling-topology-awareness)
134164

135165
### Runtime configuration file

0 commit comments

Comments
 (0)