Merge pull request #291 from andyzhangx/dnsPolicy
feat: change dnsPolicy to Default and add dnsPolicy setting in chart
This commit is contained in:
commit
a88b659dec
19
Makefile
19
Makefile
@ -76,24 +76,6 @@ local-build-push: nfs
|
||||
docker build -t $(LOCAL_USER)/nfsplugin:latest .
|
||||
docker push $(LOCAL_USER)/nfsplugin
|
||||
|
||||
.PHONY: local-k8s-install
|
||||
local-k8s-install:
|
||||
echo "Instlling locally"
|
||||
kubectl apply -f $(DEPLOY_FOLDER)/rbac-csi-nfs-controller.yaml
|
||||
kubectl apply -f $(DEPLOY_FOLDER)/csi-nfs-driverinfo.yaml
|
||||
kubectl apply -f $(DEPLOY_FOLDER)/csi-nfs-controller.yaml
|
||||
kubectl apply -f $(DEPLOY_FOLDER)/csi-nfs-node.yaml
|
||||
echo "Successfully installed"
|
||||
|
||||
.PHONY: local-k8s-uninstall
|
||||
local-k8s-uninstall:
|
||||
echo "Uninstalling driver"
|
||||
kubectl delete -f $(DEPLOY_FOLDER)/csi-nfs-controller.yaml --ignore-not-found
|
||||
kubectl delete -f $(DEPLOY_FOLDER)/csi-nfs-node.yaml --ignore-not-found
|
||||
kubectl delete -f $(DEPLOY_FOLDER)/csi-nfs-driverinfo.yaml --ignore-not-found
|
||||
kubectl delete -f $(DEPLOY_FOLDER)/rbac-csi-nfs-controller.yaml --ignore-not-found
|
||||
echo "Uninstalled NFS driver"
|
||||
|
||||
.PHONY: nfs
|
||||
nfs:
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=$(ARCH) go build -a -ldflags "${LDFLAGS} ${EXT_LDFLAGS}" -mod vendor -o bin/${ARCH}/nfsplugin ./cmd/nfsplugin
|
||||
@ -163,6 +145,7 @@ e2e-bootstrap: install-helm
|
||||
OUTPUT_TYPE=registry $(MAKE) container push
|
||||
helm install csi-driver-nfs ./charts/latest/csi-driver-nfs --namespace kube-system --wait --timeout=15m -v=5 --debug \
|
||||
${E2E_HELM_OPTIONS} \
|
||||
--set controller.dnsPolicy=ClusterFirstWithHostNet \
|
||||
--set controller.logLevel=8 \
|
||||
--set node.logLevel=8
|
||||
|
||||
|
||||
@ -58,6 +58,7 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
|
||||
| `rbac.create` | whether create rbac of csi-nfs-controller | `true` |
|
||||
| `controller.replicas` | replica number of csi-nfs-controller | `1` |
|
||||
| `controller.runOnMaster` | run controller on master node | `false` |
|
||||
| `controller.dnsPolicy` | dnsPolicy of controller driver, available values: `Default`, `ClusterFirstWithHostNet`, `ClusterFirst` | `Default` |
|
||||
| `controller.logLevel` | controller driver log level |`5` |
|
||||
| `controller.workingMountDir` | working directory for provisioner to mount nfs shares temporarily | `/tmp` |
|
||||
| `controller.tolerations` | controller pod tolerations | |
|
||||
@ -71,6 +72,7 @@ The following table lists the configurable parameters of the latest NFS CSI Driv
|
||||
| `controller.resources.nfs.requests.cpu` | csi-driver-nfs cpu requests limits | 10m |
|
||||
| `controller.resources.nfs.requests.memory` | csi-driver-nfs memory requests limits | 20Mi |
|
||||
| `node.name` | driver node daemonset name | `csi-nfs-node`
|
||||
| `node.dnsPolicy` | dnsPolicy of driver node daemonset, available values: `Default`, `ClusterFirstWithHostNet`, `ClusterFirst` |
|
||||
| `node.maxUnavailable` | `maxUnavailable` value of driver node daemonset | `1`
|
||||
| `node.logLevel` | node driver log level |`5` |
|
||||
| `node.livenessProbe.healthPort ` | the health check port for liveness probe |`29653` |
|
||||
|
||||
Binary file not shown.
@ -20,7 +20,7 @@ spec:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
hostNetwork: true # controller also needs to mount nfs to create dir
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
dnsPolicy: {{ .Values.controller.dnsPolicy }}
|
||||
serviceAccountName: {{ .Values.serviceAccount.controller }}
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
|
||||
# that are necessary to run CSI nodeplugin for nfs
|
||||
---
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
@ -24,7 +23,7 @@ spec:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
dnsPolicy: {{ .Values.controller.dnsPolicy }}
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
{{- with .Values.node.tolerations }}
|
||||
|
||||
@ -43,6 +43,7 @@ controller:
|
||||
healthPort: 29652
|
||||
logLevel: 5
|
||||
workingMountDir: "/tmp"
|
||||
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
|
||||
tolerations:
|
||||
- key: "node-role.kubernetes.io/master"
|
||||
operator: "Exists"
|
||||
@ -72,6 +73,7 @@ controller:
|
||||
|
||||
node:
|
||||
name: csi-nfs-node
|
||||
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
|
||||
maxUnavailable: 1
|
||||
logLevel: 5
|
||||
livenessProbe:
|
||||
|
||||
@ -15,7 +15,7 @@ spec:
|
||||
app: csi-nfs-controller
|
||||
spec:
|
||||
hostNetwork: true # controller also needs to mount nfs to create dir
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
|
||||
serviceAccountName: csi-nfs-controller-sa
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux # add "kubernetes.io/role: master" to run controller on master node
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
---
|
||||
# This YAML file contains driver-registrar & csi driver nodeplugin API objects
|
||||
# that are necessary to run CSI nodeplugin for nfs
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
@ -20,7 +18,7 @@ spec:
|
||||
app: csi-nfs-node
|
||||
spec:
|
||||
hostNetwork: true # original nfs connection would be broken without hostNetwork setting
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
dnsPolicy: Default # available values: Default, ClusterFirstWithHostNet, ClusterFirst
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
tolerations:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user