Skip to content

Commit d7c9e80

Browse files
committed
Merge remote-tracking branch 'k8s/master' into sync-master
2 parents 84383f6 + 829d373 commit d7c9e80

File tree

93 files changed

+1448
-1169
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1448
-1169
lines changed

.github/workflows/pr.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
14-
15-
- name: Fetch history
16-
run: git fetch --prune --unshallow
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
1716

1817
- name: Set up Helm
19-
uses: azure/setup-helm@v1
18+
uses: azure/setup-helm@v3
2019
with:
21-
version: v3.6.1
20+
version: v3.10.0
2221

23-
- uses: actions/setup-python@v2
22+
- uses: actions/setup-python@v4
2423
with:
25-
python-version: 3.7
24+
python-version: '3.9'
25+
check-latest: true
2626

27+
# see example https://github.com/helm/chart-testing-action
2728
- name: Set up chart-testing
28-
uses: helm/chart-testing-action@v2.1.0
29+
uses: helm/chart-testing-action@v2.3.1
2930

30-
# https://github.com/helm/chart-testing/blob/main/doc/ct_lint.md
3131
- name: Run chart-testing (lint)
32-
run: ct lint --target-branch=${GITHUB_BASE_REF} --check-version-increment=false
32+
run: ct lint --target-branch ${GITHUB_BASE_REF}

.github/workflows/release-cpo.yaml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,6 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v3
1515

16-
- uses: actions/setup-go@v3
17-
with:
18-
go-version: 1.19
19-
20-
- name: Set up Docker Buildx
21-
uses: docker/setup-buildx-action@v1
22-
23-
- name: Login to docker hub
24-
uses: docker/login-action@v1
25-
with:
26-
registry: docker.io
27-
username: ${{ secrets.DOCKER_USERNAME }}
28-
password: ${{ secrets.DOCKER_PASSWORD }}
29-
30-
- name: Get the version from ref
31-
id: get_version
32-
run: echo VERSION=${GITHUB_REF/refs\/tags\//} >> $GITHUB_OUTPUT
33-
34-
- name: build & publish images
35-
run: |
36-
REGISTRY=docker.io/k8scloudprovider ARCHS='amd64 arm arm64 ppc64le s390x' GOOS=linux VERSION=${{ steps.get_version.outputs.VERSION }} make upload-images
37-
3816
- name: Create Release
3917
id: create_release
4018
uses: actions/create-release@v1

.github/workflows/release.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ name: Release Charts
33
on:
44
push:
55
branches:
6-
- "release-*" # Only release charts from stable branches
6+
- "master"
7+
- "release-*"
78

89
jobs:
910
release:
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: Checkout
13-
uses: actions/checkout@v2
14-
15-
- name: Fetch history
16-
run: git fetch --prune --unshallow
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
1717

1818
- name: Configure Git
1919
run: |

Dockerfile

Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# Licensed under the Apache License, Version 2.0 (the "License");
2+
# you may not use this file except in compliance with the License.
3+
# You may obtain a copy of the License at
4+
#
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
#
7+
# Unless required by applicable law or agreed to in writing, software
8+
# distributed under the License is distributed on an "AS IS" BASIS,
9+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
# See the License for the specific language governing permissions and
11+
# limitations under the License.
12+
13+
################################################################################
14+
## BUILD ARGS ##
15+
################################################################################
16+
# This build arg allows the specification of a custom Golang image.
17+
ARG GOLANG_IMAGE=golang:1.20.1
18+
19+
# The distroless image on which the CPI manager image is built.
20+
#
21+
# Please do not use "latest". Explicit tags should be used to provide
22+
# deterministic builds. Follow what kubernetes uses to build
23+
# kube-controller-manager, for example for 1.23.x:
24+
# https://github.com/kubernetes/kubernetes/blob/release-1.24/build/common.sh#L94
25+
ARG DISTROLESS_IMAGE=k8s.gcr.io/build-image/go-runner:v2.3.1-go1.20.1-bullseye.0
26+
27+
# We use Alpine as the source for default CA certificates and some output
28+
# images
29+
ARG ALPINE_IMAGE=alpine:3.15.4
30+
31+
# cinder-csi-plugin uses Debian as a base image
32+
ARG DEBIAN_IMAGE=registry.k8s.io/build-image/debian-base:bullseye-v1.4.3
33+
34+
################################################################################
35+
## BUILD STAGE ##
36+
################################################################################
37+
38+
# Build an image containing a common ca-certificates used by all target images
39+
# regardless of how they are built. We arbitrarily take ca-certificates from
40+
# the amd64 Alpine image.
41+
FROM --platform=linux/amd64 ${ALPINE_IMAGE} as certs
42+
RUN apk add --no-cache ca-certificates
43+
44+
45+
# Build all command targets. We build all command targets in a single build
46+
# stage for efficiency. Target images copy their binary from this image.
47+
# We use go's native cross compilation for multi-arch in this stage, so the
48+
# builder itself is always amd64
49+
FROM --platform=linux/amd64 ${GOLANG_IMAGE} as builder
50+
51+
ARG GOPROXY=https://goproxy.io,direct
52+
ARG TARGETOS
53+
ARG TARGETARCH
54+
ARG VERSION
55+
56+
WORKDIR /build
57+
COPY Makefile go.mod go.sum ./
58+
COPY cmd/ cmd/
59+
COPY pkg/ pkg/
60+
RUN make build GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=${GOPROXY} VERSION=${VERSION}
61+
62+
63+
################################################################################
64+
## TARGET IMAGES ##
65+
################################################################################
66+
67+
##
68+
## openstack-cloud-controller-manager
69+
##
70+
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE} as openstack-cloud-controller-manager
71+
72+
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
73+
COPY --from=builder /build/openstack-cloud-controller-manager /bin/openstack-cloud-controller-manager
74+
75+
LABEL name="openstack-cloud-controller-manager" \
76+
license="Apache Version 2.0" \
77+
maintainers="Kubernetes Authors" \
78+
description="OpenStack cloud controller manager" \
79+
distribution-scope="public" \
80+
summary="OpenStack cloud controller manager" \
81+
help="none"
82+
83+
CMD [ "/bin/openstack-cloud-controller-manager" ]
84+
85+
##
86+
## barbican-kms-plugin
87+
##
88+
FROM --platform=${TARGETPLATFORM} ${ALPINE_IMAGE} as barbican-kms-plugin
89+
# barbican-kms-plugin uses ALPINE instead of distroless because its entrypoint
90+
# uses a shell for environment substitution. If there are no other uses this
91+
# could be replaced by callers passing arguments explicitly.
92+
93+
COPY --from=builder /build/barbican-kms-plugin /bin/barbican-kms-plugin
94+
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
95+
96+
LABEL name="barbican-kms-plugin" \
97+
license="Apache Version 2.0" \
98+
maintainers="Kubernetes Authors" \
99+
description="Barbican kms plugin" \
100+
distribution-scope="public" \
101+
summary="Barbican kms plugin" \
102+
help="none"
103+
104+
CMD ["sh", "-c", "/bin/barbican-kms-plugin --socketpath ${socketpath} --cloud-config ${cloudconfig}"]
105+
106+
##
107+
## cinder-csi-plugin
108+
##
109+
FROM --platform=${TARGETPLATFORM} ${DEBIAN_IMAGE} as cinder-csi-plugin
110+
111+
# Install e4fsprogs for format
112+
RUN clean-install btrfs-progs e2fsprogs mount udev xfsprogs
113+
114+
COPY --from=builder /build/cinder-csi-plugin /bin/cinder-csi-plugin
115+
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
116+
117+
LABEL name="cinder-csi-plugin" \
118+
license="Apache Version 2.0" \
119+
maintainers="Kubernetes Authors" \
120+
description="Cinder CSI Plugin" \
121+
distribution-scope="public" \
122+
summary="Cinder CSI Plugin" \
123+
help="none"
124+
125+
CMD ["/bin/cinder-csi-plugin"]
126+
127+
##
128+
## k8s-keystone-auth
129+
##
130+
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE} as k8s-keystone-auth
131+
132+
COPY --from=builder /build/k8s-keystone-auth /bin/k8s-keystone-auth
133+
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
134+
135+
LABEL name="k8s-keystone-auth" \
136+
license="Apache Version 2.0" \
137+
maintainers="Kubernetes Authors" \
138+
description="K8s Keystone Auth" \
139+
distribution-scope="public" \
140+
summary="K8s Keystone Auth" \
141+
help="none"
142+
143+
EXPOSE 8443
144+
145+
CMD ["/bin/k8s-keystone-auth"]
146+
147+
##
148+
## magnum-auto-healer
149+
##
150+
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE} as magnum-auto-healer
151+
152+
COPY --from=builder /build/magnum-auto-healer /bin/magnum-auto-healer
153+
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
154+
155+
LABEL name="magnum-auto-healer" \
156+
license="Apache Version 2.0" \
157+
maintainers="Kubernetes Authors" \
158+
description="Magnum auto healer" \
159+
distribution-scope="public" \
160+
summary="Magnum auto healer" \
161+
help="none"
162+
163+
CMD ["/bin/magnum-auto-healer"]
164+
165+
##
166+
## manila-csi-plugin
167+
##
168+
FROM --platform=${TARGETPLATFORM} ${ALPINE_IMAGE} as manila-csi-plugin
169+
# manila-csi-plugin uses ALPINE because it pulls in jq and curl
170+
171+
RUN apk add --no-cache jq curl
172+
173+
COPY --from=builder /build/manila-csi-plugin /bin/manila-csi-plugin
174+
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
175+
176+
LABEL name="manila-csi-plugin" \
177+
license="Apache Version 2.0" \
178+
maintainers="Kubernetes Authors" \
179+
description="Manila CSI Plugin" \
180+
distribution-scope="public" \
181+
summary="Manila CSI Plugin" \
182+
help="none"
183+
184+
ENTRYPOINT ["/bin/manila-csi-plugin"]
185+
186+
##
187+
## octavia-ingress-controller
188+
##
189+
FROM --platform=${TARGETPLATFORM} ${DISTROLESS_IMAGE} as octavia-ingress-controller
190+
191+
COPY --from=builder /build/octavia-ingress-controller /bin/octavia-ingress-controller
192+
COPY --from=certs /etc/ssl/certs /etc/ssl/certs
193+
194+
LABEL name="octavia-ingress-controller" \
195+
license="Apache Version 2.0" \
196+
maintainers="Kubernetes Authors" \
197+
description="Octavia ingress controller" \
198+
distribution-scope="public" \
199+
summary="Octavia ingress controller" \
200+
help="none"
201+
202+
CMD ["/bin/octavia-ingress-controller"]

0 commit comments

Comments
 (0)