Skip to content

Commit 0c706ef

Browse files
authored
Merge branch 'master' into patch-1
2 parents 450b926 + 8e5b561 commit 0c706ef

File tree

4,686 files changed

+834
-1730492
lines changed

Some content is hidden

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

4,686 files changed

+834
-1730492
lines changed

Dockerfile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,34 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
ARG AL_VERSION=al23
1516
FROM --platform=$BUILDPLATFORM golang:1.24 as builder
1617
WORKDIR /go/src/github.com/kubernetes-sigs/aws-fsx-csi-driver
18+
COPY go.* .
19+
RUN go mod download
1720
COPY . .
1821
ARG TARGETOS
1922
ARG TARGETARCH
2023
RUN OS=$TARGETOS ARCH=$TARGETARCH make $TARGETOS/$TARGETARCH
2124

2225
# https://github.com/aws/eks-distro-build-tooling/blob/main/eks-distro-base/Dockerfile.minimal-base-csi-ebs#L36
23-
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi-ebs-builder:latest-al2 as rpm-installer
24-
26+
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi-ebs-builder:latest-${AL_VERSION} as rpm-installer
27+
ARG AL_VERSION
2528
# shallow install systemd and the kernel which are not needed in the final container image
2629
# since lustre is not run as a systemd service and the kernel module is node loaded via the container
2730
# to avoid pulling in a large tree of unnecessary dependencies
2831
RUN set -x && \
2932
enable_extra lustre && \
30-
clean_install "kernel systemd" true true && \
31-
clean_install lustre-client && \
33+
clean_install "kernel systemd" true true; \
34+
if [[ "${AL_VERSION}" == "al23" ]]; then \
35+
clean_install lustre-client; \
36+
else \
37+
clean_install lustre; \
38+
fi; \
3239
remove_package "kernel systemd" true && \
3340
cleanup "fsx-csi"
3441

35-
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi-ebs:latest-al2 AS linux-amazon
42+
FROM public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-csi-ebs:latest-${AL_VERSION} AS linux-amazon
3643

3744
COPY --from=rpm-installer /newroot /
3845

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ OUTPUT_TYPE?=docker
3535
OS?=linux
3636
ARCH?=amd64
3737
OSVERSION?=amazon
38+
AL_VERSION?=al23
3839

3940
ALL_OS?=linux
4041
ALL_ARCH_linux?=amd64 arm64
@@ -53,7 +54,7 @@ word-hyphen = $(word $2,$(subst -, ,$1))
5354
.PHONY: linux/$(ARCH) bin/aws-fsx-csi-driver
5455
linux/$(ARCH): bin/aws-fsx-csi-driver
5556
bin/aws-fsx-csi-driver: | bin
56-
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -ldflags ${LDFLAGS} -o bin/aws-fsx-csi-driver ./cmd/
57+
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -mod=mod -ldflags ${LDFLAGS} -o bin/aws-fsx-csi-driver ./cmd/
5758

5859
.PHONY: all
5960
all: all-image-docker
@@ -89,6 +90,7 @@ image: .image-$(TAG)-$(OS)-$(ARCH)-$(OSVERSION)
8990
-t=$(IMAGE):$(TAG)-$(OS)-$(ARCH)-$(OSVERSION) \
9091
--build-arg=GOPROXY=$(GOPROXY) \
9192
--build-arg=VERSION=$(VERSION) \
93+
--build-arg=AL_VERSION=$(AL_VERSION) \
9294
`./hack/provenance` \
9395
.
9496
touch $@

charts/aws-fsx-csi-driver/templates/controller-deployment.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ spec:
3939
{{- end }}
4040
containers:
4141
- name: fsx-plugin
42-
image: {{ printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) (toString .Values.image.tag)) }}
42+
image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.image.repository (default (printf "v%s" .Chart.AppVersion) (.Values.image.tag | toString)) }}
4343
imagePullPolicy: {{ .Values.image.pullPolicy }}
4444
args:
4545
- --mode={{ .Values.controller.mode }}
@@ -65,10 +65,10 @@ spec:
6565
name: aws-secret
6666
key: access_key
6767
optional: true
68-
{{- with .Values.controller.region }}
68+
{{- with .Values.controller.region }}
6969
- name: AWS_REGION
7070
value: {{ . }}
71-
{{- end }}
71+
{{- end }}
7272
volumeMounts:
7373
- name: socket-dir
7474
mountPath: /var/lib/csi/sockets/pluginproxy/
@@ -89,7 +89,7 @@ spec:
8989
{{- toYaml . | nindent 12 }}
9090
{{- end }}
9191
- name: csi-provisioner
92-
image: {{ printf "%s:%s" .Values.sidecars.provisioner.image.repository .Values.sidecars.provisioner.image.tag }}
92+
image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.sidecars.provisioner.image.repository .Values.sidecars.provisioner.image.tag }}
9393
args:
9494
- --csi-address=$(ADDRESS)
9595
- --v={{ .Values.sidecars.provisioner.logLevel }}
@@ -107,7 +107,7 @@ spec:
107107
{{- toYaml . | nindent 12 }}
108108
{{- end }}
109109
- name: csi-resizer
110-
image: {{ printf "%s:%s" .Values.sidecars.resizer.image.repository .Values.sidecars.resizer.image.tag }}
110+
image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.sidecars.resizer.image.repository .Values.sidecars.resizer.image.tag }}
111111
args:
112112
- --csi-address=$(ADDRESS)
113113
- --v={{ .Values.sidecars.resizer.logLevel }}
@@ -124,7 +124,7 @@ spec:
124124
{{- toYaml . | nindent 12 }}
125125
{{- end }}
126126
- name: liveness-probe
127-
image: {{ printf "%s:%s" .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }}
127+
image: {{ printf "%s%s:%s" (default "" .Values.image.containerRegistry) .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }}
128128
args:
129129
- --csi-address=/csi/csi.sock
130130
- --health-port=9910
@@ -138,3 +138,11 @@ spec:
138138
volumes:
139139
- name: socket-dir
140140
emptyDir: {}
141+
{{- with .Values.controller.affinity }}
142+
affinity:
143+
{{- toYaml . | nindent 8 }}
144+
{{- end }}
145+
{{- with .Values.controller.topologySpreadConstraints }}
146+
topologySpreadConstraints:
147+
{{- toYaml . | nindent 8 }}
148+
{{- end }}

charts/aws-fsx-csi-driver/templates/node-daemonset.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ spec:
4444
tolerations:
4545
{{- if .Values.node.tolerateAllTaints }}
4646
- operator: Exists
47-
{{- else }}
48-
{{- with .Values.node.tolerations }}
49-
{{- toYaml . | nindent 8 }}
50-
{{- end }}
47+
{{- else }}
48+
{{- with .Values.node.tolerations }}
49+
{{- toYaml . | nindent 8 }}
50+
{{- end }}
5151
- key: "fsx.csi.aws.com/agent-not-ready"
5252
operator: "Exists"
53-
{{- end }}
53+
{{- end }}
5454
{{- with .Values.node.affinity }}
5555
affinity: {{- toYaml . | nindent 8 }}
5656
{{- end }}
@@ -72,10 +72,10 @@ spec:
7272
valueFrom:
7373
fieldRef:
7474
fieldPath: spec.nodeName
75-
{{- with .Values.node.region }}
75+
{{- with .Values.node.region }}
7676
- name: AWS_REGION
7777
value: {{ . }}
78-
{{- end }}
78+
{{- end }}
7979
volumeMounts:
8080
- name: kubelet-dir
8181
mountPath: /var/lib/kubelet
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{{- if and .Values.controller.podDisruptionBudget.enabled (not .Values.nodeComponentOnly) -}}
2+
apiVersion: policy/v1
3+
kind: PodDisruptionBudget
4+
metadata:
5+
name: fsx-csi-controller
6+
namespace: kube-system
7+
labels:
8+
{{- include "aws-fsx-csi-driver.labels" . | nindent 4 }}
9+
spec:
10+
selector:
11+
matchLabels:
12+
app: fsx-csi-controller
13+
{{- include "aws-fsx-csi-driver.selectorLabels" . | nindent 6 }}
14+
{{- if .Values.controller.podDisruptionBudget.unhealthyPodEvictionPolicy }}
15+
unhealthyPodEvictionPolicy: {{ .Values.controller.podDisruptionBudget.unhealthyPodEvictionPolicy }}
16+
{{- end }}
17+
{{- if le (.Values.controller.replicaCount | int) 2 }}
18+
maxUnavailable: 1
19+
{{- else }}
20+
minAvailable: 2
21+
{{- end }}
22+
{{- end -}}

charts/aws-fsx-csi-driver/values.yaml

Lines changed: 109 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
image:
66
repository: public.ecr.aws/fsx-csi-driver/aws-fsx-csi-driver
7-
tag: v1.4.0
7+
tag: "v1.4.0"
88
pullPolicy: IfNotPresent
99

1010
csidriver:
@@ -14,37 +14,75 @@ sidecars:
1414
livenessProbe:
1515
image:
1616
repository: public.ecr.aws/eks-distro/kubernetes-csi/livenessprobe
17-
tag: v2.15.0-eks-1-33-3
17+
tag: v2.15.0-eks-1-33-9
1818
pullPolicy: IfNotPresent
19-
resources: {}
19+
resources:
20+
requests:
21+
cpu: 10m
22+
memory: 32Mi
23+
limits:
24+
memory: 128Mi
25+
securityContext:
26+
readOnlyRootFilesystem: true
27+
allowPrivilegeEscalation: false
2028
nodeDriverRegistrar:
2129
image:
2230
repository: public.ecr.aws/eks-distro/kubernetes-csi/node-driver-registrar
23-
tag: v2.13.0-eks-1-33-3
31+
tag: v2.13.0-eks-1-33-9
2432
pullPolicy: IfNotPresent
2533
logLevel: 2
26-
resources: {}
34+
resources:
35+
requests:
36+
cpu: 10m
37+
memory: 32Mi
38+
limits:
39+
memory: 128Mi
40+
securityContext:
41+
readOnlyRootFilesystem: true
42+
allowPrivilegeEscalation: false
2743
provisioner:
2844
image:
2945
repository: public.ecr.aws/eks-distro/kubernetes-csi/external-provisioner
30-
tag: v5.2.0-eks-1-33-3
46+
tag: v5.2.0-eks-1-33-9
3147
pullPolicy: IfNotPresent
3248
logLevel: 2
33-
resources: {}
49+
resources:
50+
requests:
51+
cpu: 10m
52+
memory: 32Mi
53+
limits:
54+
memory: 128Mi
55+
securityContext:
56+
readOnlyRootFilesystem: true
57+
allowPrivilegeEscalation: false
3458
resizer:
3559
image:
3660
repository: public.ecr.aws/eks-distro/kubernetes-csi/external-resizer
37-
tag: v1.13.2-eks-1-33-3
61+
tag: v1.13.2-eks-1-33-9
3862
pullPolicy: IfNotPresent
3963
logLevel: 2
40-
resources: {}
64+
resources:
65+
requests:
66+
cpu: 10m
67+
memory: 32Mi
68+
limits:
69+
memory: 128Mi
70+
securityContext:
71+
readOnlyRootFilesystem: true
72+
allowPrivilegeEscalation: false
4173

4274
controller:
4375
mode: controller
4476
loggingFormat: text
4577
nodeSelector: {}
4678
replicaCount: 2
47-
resources: {}
79+
#If you do want to specify resources, uncomment the following lines, adjust them as necessary
80+
resources:
81+
requests:
82+
cpu: 10m
83+
memory: 40Mi
84+
limits:
85+
memory: 256Mi
4886
serviceAccount:
4987
# Specifies whether a service account should be created
5088
create: true
@@ -65,14 +103,55 @@ controller:
65103
- effect: NoExecute
66104
operator: Exists
67105
tolerationSeconds: 300
106+
# securityContext on the controller pod
107+
securityContext:
108+
runAsNonRoot: false
109+
runAsUser: 0
110+
runAsGroup: 0
111+
fsGroup: 0
112+
# securityContext on the controller container
113+
# Setting privileged=false will cause the "delete-access-point-root-dir" controller option to fail
114+
containerSecurityContext:
115+
privileged: true
116+
leaderElectionRenewDeadline: 10s
117+
leaderElectionLeaseDuration: 15s
118+
affinity:
119+
nodeAffinity:
120+
preferredDuringSchedulingIgnoredDuringExecution:
121+
- weight: 1
122+
preference:
123+
matchExpressions:
124+
- key: eks.amazonaws.com/compute-type
125+
operator: NotIn
126+
values:
127+
- fargate
128+
- hybrid
129+
# topologySpreadConstraints:
130+
# - maxSkew: 1
131+
# topologyKey: topology.kubernetes.io/zone
132+
# whenUnsatisfiable: ScheduleAnyway
133+
# - maxSkew: 1
134+
# topologyKey: kubernetes.io/hostname
135+
# whenUnsatisfiable: ScheduleAnyway
136+
topologySpreadConstraints: []
137+
podDisruptionBudget:
138+
# Warning: Disabling PodDisruptionBudget may lead to delays in stateful workloads starting due to controller
139+
# pod restarts or evictions.
140+
enabled: true
68141

69142
node:
70143
mode: node
71144
loggingFormat: text
72145
logLevel: 2
73146
nodeSelector: {}
74147
updateStrategy: {}
75-
resources: {}
148+
#If you do want to specify resources, uncomment the following lines, adjust them as necessary,
149+
resources:
150+
requests:
151+
cpu: 10m
152+
memory: 40Mi
153+
limits:
154+
memory: 256Mi
76155
dnsPolicy: ClusterFirst
77156
dnsConfig:
78157
{}
@@ -88,13 +167,18 @@ node:
88167
# eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/fsx-csi-role
89168
name: fsx-csi-node-sa
90169
annotations: {}
170+
healthPort: 9809
171+
# securityContext on the node pod
172+
securityContext:
173+
# The node pod must be run as root to bind to the registration/driver sockets
174+
runAsNonRoot: false
175+
runAsUser: 0
176+
runAsGroup: 0
177+
fsGroup: 0
178+
env: []
179+
volumes: []
180+
volumeMounts: []
91181
podAnnotations: {}
92-
# AWS region to use. If not specified then the region will be looked up via the AWS EC2 metadata
93-
# service.
94-
# ---
95-
# region: us-east-1
96-
region:
97-
terminationGracePeriodSeconds: 30
98182
tolerateAllTaints: true
99183
tolerations:
100184
- operator: Exists
@@ -109,8 +193,15 @@ node:
109193
operator: NotIn
110194
values:
111195
- fargate
112-
196+
- hybrid
197+
113198
nameOverride: ""
114199
fullnameOverride: ""
115200

116201
imagePullSecrets: []
202+
203+
nodeComponentOnly: false
204+
# nodeComponentOnly: true
205+
# Only deploys the node DaemonSet, Skips controller deployment
206+
# nodeComponentOnly: false (default)
207+
# Deploys both controller and node components, normal full deployment

0 commit comments

Comments
 (0)