-
Notifications
You must be signed in to change notification settings - Fork 159
New kustomization for pd driver #520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: | ||
gce-pd-csi-driver | ||
resources: | ||
- cluster_setup.yaml | ||
- controller.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
commonLabels: | ||
k8s-app: gcp-compute-persistent-disk-csi-driver | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: | ||
gce-pd-csi-driver | ||
resources: | ||
- node.yaml | ||
- controller.yaml | ||
- setup-cluster.yaml | ||
- controller | ||
- node_linux | ||
- node_windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: | ||
gce-pd-csi-driver | ||
resources: | ||
- node.yaml | ||
- psp.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: csi-gce-pd-node-psp | ||
spec: | ||
seLinux: | ||
rule: RunAsAny | ||
supplementalGroups: | ||
rule: RunAsAny | ||
runAsUser: | ||
rule: RunAsAny | ||
fsGroup: | ||
rule: RunAsAny | ||
privileged: true | ||
volumes: | ||
- '*' | ||
hostNetwork: true | ||
allowedHostPaths: | ||
- pathPrefix: "/var/lib/kubelet/plugins_registry/" | ||
- pathPrefix: "/var/lib/kubelet" | ||
- pathPrefix: "/var/lib/kubelet/plugins/pd.csi.storage.gke.io/" | ||
- pathPrefix: "/dev" | ||
- pathPrefix: "/etc/udev" | ||
- pathPrefix: "/lib/udev" | ||
- pathPrefix: "/run/udev" | ||
- pathPrefix: "/sys" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: | ||
gce-pd-csi-driver | ||
resources: | ||
- node.yaml | ||
- psp.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#TODO(#40): Force DaemonSet to not run on master. | ||
kind: DaemonSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-gce-pd-node-win | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: gcp-compute-persistent-disk-csi-driver-win | ||
template: | ||
metadata: | ||
labels: | ||
app: gcp-compute-persistent-disk-csi-driver-win | ||
spec: | ||
# Host network must be used for interaction with Workload Identity in GKE | ||
# since it replaces GCE Metadata Server with GKE Metadata Server. Remove | ||
# this requirement when issue is resolved and before any exposure of | ||
# metrics ports. But hostNetwork is not working for Windows, might be an issue | ||
# when deploying on GKE Windows node. | ||
# hostNetwork: true | ||
priorityClassName: csi-gce-pd-node | ||
serviceAccountName: csi-gce-pd-node-sa | ||
nodeSelector: | ||
kubernetes.io/os: windows | ||
containers: | ||
- name: csi-driver-registrar | ||
image: gke.gcr.io/k8s-staging-csi/csi-node-driver-registrar-win | ||
args: | ||
- --v=5 | ||
- --csi-address=unix://C:\\csi\\csi.sock | ||
- --kubelet-registration-path=C:\\var\\lib\\kubelet\\plugins\\pd.csi.storage.gke.io\\csi.sock | ||
env: | ||
- name: KUBE_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
volumeMounts: | ||
- name: plugin-dir | ||
mountPath: /csi | ||
- name: registration-dir | ||
mountPath: /registration | ||
- name: gce-pd-driver | ||
# Don't change base image without changing pdImagePlaceholder in | ||
# test/k8s-integration/main.go | ||
image: gke.gcr.io/gcp-compute-persistent-disk-csi-driver-win | ||
args: | ||
- "--v=5" | ||
- "--endpoint=unix:/csi/csi.sock" | ||
volumeMounts: | ||
- name: kubelet-dir | ||
mountPath: C:\var\lib\kubelet | ||
mountPropagation: "None" | ||
- name: plugin-dir | ||
mountPath: C:\csi | ||
- name: csi-proxy-disk-pipe | ||
mountPath: \\.\pipe\csi-proxy-disk-v1alpha1 | ||
- name: csi-proxy-volume-pipe | ||
mountPath: \\.\pipe\csi-proxy-volume-v1alpha1 | ||
- name: csi-proxy-filesystem-pipe | ||
mountPath: \\.\pipe\csi-proxy-filesystem-v1alpha1 | ||
volumes: | ||
- name: csi-proxy-disk-pipe | ||
hostPath: | ||
path: \\.\pipe\csi-proxy-disk-v1alpha1 | ||
type: "" | ||
- name: csi-proxy-volume-pipe | ||
hostPath: | ||
path: \\.\pipe\csi-proxy-volume-v1alpha1 | ||
type: "" | ||
- name: csi-proxy-filesystem-pipe | ||
hostPath: | ||
path: \\.\pipe\csi-proxy-filesystem-v1alpha1 | ||
type: "" | ||
- name: registration-dir | ||
hostPath: | ||
path: \var\lib\kubelet\plugins_registry | ||
type: Directory | ||
- name: kubelet-dir | ||
hostPath: | ||
path: \var\lib\kubelet | ||
type: Directory | ||
- name: plugin-dir | ||
hostPath: | ||
path: \var\lib\kubelet\plugins\pd.csi.storage.gke.io | ||
type: DirectoryOrCreate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: policy/v1beta1 | ||
kind: PodSecurityPolicy | ||
metadata: | ||
name: csi-gce-pd-node-psp-win | ||
spec: | ||
supplementalGroups: | ||
rule: RunAsAny | ||
runAsUser: | ||
rule: RunAsAny | ||
fsGroup: | ||
rule: RunAsAny | ||
seLinux: | ||
rule: RunAsAny | ||
volumes: | ||
- '*' | ||
hostNetwork: true | ||
allowedHostPaths: | ||
- pathPrefix: \var\lib\kubelet | ||
- pathPrefix: \var\lib\kubelet\plugins_registry | ||
- pathPrefix: \var\lib\kubelet\plugins\pd.csi.storage.gke.io | ||
- pathPrefix: \\.\pipe\csi-proxy-disk-v1alpha1 | ||
- pathPrefix: \\.\pipe\csi-proxy-volume-v1alpha1 | ||
- pathPrefix: \\.\pipe\csi-proxy-filesystem-v1alpha1 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: builtin | ||
kind: ImageTagTransformer | ||
metadata: | ||
name: imagetag-gcepd-driver-alpha-win | ||
imageTag: | ||
name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver-win | ||
newName: gcr.io/jing-k8s-dev/gce-pd-windows-2019 | ||
newTag: "0.2.0" | ||
--- | ||
|
||
apiVersion: builtin | ||
kind: ImageTagTransformer | ||
metadata: | ||
name: imagetag-node-registrar-win | ||
imageTag: | ||
name: gke.gcr.io/k8s-staging-csi/csi-node-driver-registrar-win | ||
newName: gcr.io/k8s-staging-csi/csi-node-driver-registrar | ||
newTag: "amd64-windows-v20200428-v1.3.0-26-g510710d5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace: | ||
gce-pd-csi-driver | ||
resources: | ||
- ../stable/ | ||
- image.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: builtin | ||
kind: ImageTagTransformer | ||
metadata: | ||
name: imagetag-gcepd-driver-dev | ||
imageTag: | ||
name: gke.gcr.io/gcp-compute-persistent-disk-csi-driver | ||
newName: gcr.io/dyzz-csi-staging/csi/gce-pd-driver | ||
newTag: "latest" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace: | ||
gce-pd-csi-driver | ||
resources: | ||
- ../alpha/ | ||
- image.yaml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we ever need to change the tag for node-driver-registrar in the dev overlay, should it use the image name in base or alpha?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it is only for dev, then change the image in the image.yaml file under /dev
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this
dev/image.yaml
, do we setimageTag.name
to the one in base (gke.gcr.io/gcp-compute-persistent-disk-csi-driver-win
) or alpha (gke.gcr.io/k8s-staging-csi/csi-node-driver-registrar-win
)? And does the answer depend on other factors, like maybe the ordering of items inkustomization.yaml
?I'm not sure if we'll ever need to update node registrar tag name, so we can potentially defer this question until that happens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no image name gke.gcr.io/gcp-compute-persistent-disk-csi-driver-win (this is for windows) in base (stable).
Generally, the following can happen
in stable, change image name --> nameA
in alpha, change image name --> nameB
if alpha is also based on stable, I think the final image name will be nameA.
Or,
in stable, change image name --> nameA
in alpha, change image nameA --> nameB
if alpha is also based on stable, I think the final image name will be nameB.
This is using ImageTagTransformer. I also tested using both ImageTagTransformer and images section directly in kustomization.yaml. The latter (images section) seems taking the final effect.
There are so many ways to construct this, we just have to try it out.