Skip to content

Commit

Permalink
Merge pull request #163 from gnufied/add-azure-file-hypershift
Browse files Browse the repository at this point in the history
STOR-1762: Add azure file hypershift
  • Loading branch information
openshift-merge-bot[bot] committed Feb 27, 2024
2 parents 8ab15b9 + 59e2de9 commit 74590de
Show file tree
Hide file tree
Showing 61 changed files with 2,742 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile.azure-file
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
WORKDIR /go/src/github.com/openshift/azure-file-csi-driver-operator
COPY legacy/azure-file-csi-driver-operator .
WORKDIR /go/src/github.com/openshift/csi-operator
COPY . .
RUN make


FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
COPY --from=builder /go/src/github.com/openshift/azure-file-csi-driver-operator/azure-file-csi-driver-operator /usr/bin/
COPY --from=builder /go/src/github.com/openshift/csi-operator/bin/azure-file-csi-driver-operator /usr/bin/
ENTRYPOINT ["/usr/bin/azure-file-csi-driver-operator"]
LABEL io.k8s.display-name="OpenShift Azure File CSI Driver Operator" \
io.k8s.description="The Azure File CSI Driver Operator installs and maintains the Azure File CSI Driver on a cluster."
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: azure-file-csi-driver-binding
subjects:
- kind: ServiceAccount
name: azure-file-csi-driver-controller-sa
namespace: openshift-cluster-csi-drivers
roleRef:
kind: ClusterRole
name: azure-file-csi-driver-role
apiGroup: rbac.authorization.k8s.io
8 changes: 8 additions & 0 deletions assets/overlays/azure-file/base/csi-driver-cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: azure-file-csi-driver-role
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "update", "delete", "patch"]
16 changes: 16 additions & 0 deletions assets/overlays/azure-file/base/csidriver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: file.csi.azure.com
annotations:
# Used to determine if a CSI driver was created by OCP or by 3rd party operator / helm / yaml files.
csi.openshift.io/managed: "true"
labels:
security.openshift.io/csi-ephemeral-volume-profile: "privileged"
spec:
fsGroupPolicy: "None"
attachRequired: false
podInfoOnMount: true
volumeLifecycleModes:
- Persistent
- Ephemeral
16 changes: 16 additions & 0 deletions assets/overlays/azure-file/base/storageclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Taken from https://github.com/kubernetes-sigs/azurefile-csi-driver/blob/master/deploy/example/storageclass-azurefile-csi.yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: azurefile-csi
provisioner: file.csi.azure.com
allowVolumeExpansion: true
parameters:
skuName: Standard_LRS # available values: Standard_LRS, Standard_GRS, Standard_ZRS, Standard_RAGRS, Premium_LRS
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
- mfsymlinks
- cache=strict # https://linux.die.net/man/8/mount.cifs
- nosharesock # reduce probability of reconnect race
- actimeo=30 # reduce latency for metadata-heavy workload
13 changes: 13 additions & 0 deletions assets/overlays/azure-file/generated/hypershift/cabundle_cm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated file. Do not edit. Update using "make update".
#
# Loaded from base/cabundle_cm.yaml
#
#

apiVersion: v1
kind: ConfigMap
metadata:
labels:
config.openshift.io/inject-trusted-cabundle: "true"
name: azure-file-csi-driver-trusted-ca-bundle
namespace: ${NAMESPACE}

0 comments on commit 74590de

Please sign in to comment.