-
Notifications
You must be signed in to change notification settings - Fork 218
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
deployment enhancements #29
Changes from all commits
d9a83c2
a584a36
1d8a018
931e8aa
41522f4
879ba77
bcd0535
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
The deployment for Kubernetes 1.13 uses CSI 1.0 and thus is | ||
incompatible with older Kubernetes releases. | ||
|
||
The sidecar images rely on the CRDs for CSIDriverInfo and CSINodeInfo, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we have different directories for alpha features? This makes it easier to test forward compatibility of a sidecar using only beta/ga features There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps the comment is misleading: this particular example does specify anything related to alpha features and thus can be used unchanged on Kubernetes 1.13 and 1.14. What I was trying to say here is that if someone uses the same sidecars as the example and depends on alpha features like topology, then his deployment won't work on Kubernetes 1.14. We may need an "alpha" variant of these examples at some point (for example, after adding topology support to the hostpath driver), but right now I think they are not needed. |
||
which were replaced with builtin APIs in Kubernetes 1.14. They can be | ||
deployed on Kubernetes 1.14 if the CRDs are installed, but features | ||
relying on these CRDs (like topology) are unlikely to work. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../util/deploy-hostpath.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# WARNING: this is only for testing purposes. Do not install in a production | ||
# cluster. | ||
# | ||
# This exposes the hostpath's Unix domain csi.sock as a TCP port to the | ||
# outside world. The mapping from Unix domain socket to TCP is done | ||
# by socat. | ||
# | ||
# This is useful for testing with csi-sanity or csc. | ||
|
||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: hostpath-service | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: csi-hostpath-socat | ||
ports: | ||
- port: 10000 # fixed port inside the pod, dynamically allocated port outside | ||
--- | ||
kind: StatefulSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-hostpath-socat | ||
spec: | ||
serviceName: "csi-hostpath-socat" | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: csi-hostpath-socat | ||
template: | ||
metadata: | ||
labels: | ||
app: csi-hostpath-socat | ||
spec: | ||
affinity: | ||
podAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: app | ||
operator: In | ||
values: | ||
- csi-hostpathplugin | ||
topologyKey: kubernetes.io/hostname | ||
containers: | ||
- name: socat | ||
image: alpine/socat:1.0.3 | ||
args: | ||
- tcp-listen:10000,fork,reuseaddr | ||
- unix-connect:/csi/csi.sock | ||
volumeMounts: | ||
- mountPath: /csi | ||
name: socket-dir | ||
volumes: | ||
- hostPath: | ||
path: /var/lib/kubelet/plugins/csi-hostpath | ||
type: DirectoryOrCreate | ||
name: socket-dir |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
master |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
kubernetes-1.14 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
The deployment for master uses CSI 1.0 and thus is incompatible with | ||
Kubernetes < 1.13. | ||
|
||
It uses the APIs for CSIDriverInfo and CSINodeInfo that were | ||
introduced in Kubernetes 1.14, so features depending on those (like | ||
topology) will not work on Kubernetes 1.13. But because this example | ||
deployment does not enable those features, it can run on Kubernetes | ||
1.13. | ||
|
||
WARNING: this example uses the "canary" images. It can break at any | ||
time. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../util/deploy-hostpath.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: csi-hostpath-attacher | ||
labels: | ||
app: csi-hostpath-attacher | ||
spec: | ||
selector: | ||
app: csi-hostpath-attacher | ||
ports: | ||
- name: dummy | ||
port: 12345 | ||
|
||
--- | ||
kind: StatefulSet | ||
apiVersion: apps/v1 | ||
metadata: | ||
name: csi-hostpath-attacher | ||
spec: | ||
serviceName: "csi-hostpath-attacher" | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: csi-hostpath-attacher | ||
template: | ||
metadata: | ||
labels: | ||
app: csi-hostpath-attacher | ||
spec: | ||
affinity: | ||
podAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
- labelSelector: | ||
matchExpressions: | ||
- key: app | ||
operator: In | ||
values: | ||
- csi-hostpathplugin | ||
topologyKey: kubernetes.io/hostname | ||
serviceAccountName: csi-attacher | ||
containers: | ||
- name: csi-attacher | ||
image: quay.io/k8scsi/csi-attacher:canary # TODO: replace with released version | ||
args: | ||
- --v=5 | ||
- --csi-address=/csi/csi.sock | ||
volumeMounts: | ||
- mountPath: /csi | ||
name: socket-dir | ||
|
||
volumes: | ||
- hostPath: | ||
path: /var/lib/kubelet/plugins/csi-hostpath | ||
type: DirectoryOrCreate | ||
name: socket-dir |
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.
Why not master? So we don't have to keep on updating this readme whenever a new kubernetes release comes out