mirror of https://github.com/kubernetes/kops.git
Merge pull request #8062 from hakman/fix-flexvol
Fix mounting Calico "flexvol-driver-host" in CoreOS
This commit is contained in:
commit
fd34b98364
|
@ -241,6 +241,17 @@ func RunUpdateCluster(f *util.Factory, clusterName string, out io.Writer, c *Upd
|
||||||
}
|
}
|
||||||
for i := range list.Items {
|
for i := range list.Items {
|
||||||
instanceGroups = append(instanceGroups, &list.Items[i])
|
instanceGroups = append(instanceGroups, &list.Items[i])
|
||||||
|
|
||||||
|
// Try to guess the path for additional third party volume plugins in CoreOS and Flatcar
|
||||||
|
image := strings.ToLower(list.Items[i].Spec.Image)
|
||||||
|
if strings.Contains(image, "coreos") || strings.Contains(image, "flatcar") {
|
||||||
|
if cluster.Spec.Kubelet == nil {
|
||||||
|
cluster.Spec.Kubelet = &kops.KubeletConfigSpec{}
|
||||||
|
}
|
||||||
|
if cluster.Spec.Kubelet.VolumePluginDirectory == "" {
|
||||||
|
cluster.Spec.Kubelet.VolumePluginDirectory = "/var/lib/kubelet/volumeplugins/"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -578,7 +578,7 @@ spec:
|
||||||
serviceAccountName: calico-node
|
serviceAccountName: calico-node
|
||||||
priorityClassName: system-cluster-critical
|
priorityClassName: system-cluster-critical
|
||||||
containers:
|
containers:
|
||||||
- image: calico/typha:v3.9.1
|
- image: calico/typha:v3.9.3
|
||||||
name: calico-typha
|
name: calico-typha
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5473
|
- containerPort: 5473
|
||||||
|
@ -694,7 +694,7 @@ spec:
|
||||||
# It can be deleted if this is a fresh installation, or if you have already
|
# It can be deleted if this is a fresh installation, or if you have already
|
||||||
# upgraded to use calico-ipam.
|
# upgraded to use calico-ipam.
|
||||||
- name: upgrade-ipam
|
- name: upgrade-ipam
|
||||||
image: calico/cni:v3.9.1
|
image: calico/cni:v3.9.3
|
||||||
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
|
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
|
||||||
env:
|
env:
|
||||||
- name: KUBERNETES_NODE_NAME
|
- name: KUBERNETES_NODE_NAME
|
||||||
|
@ -714,7 +714,7 @@ spec:
|
||||||
# This container installs the CNI binaries
|
# This container installs the CNI binaries
|
||||||
# and CNI network config file on each node.
|
# and CNI network config file on each node.
|
||||||
- name: install-cni
|
- name: install-cni
|
||||||
image: calico/cni:v3.9.1
|
image: calico/cni:v3.9.3
|
||||||
command: ["/install-cni.sh"]
|
command: ["/install-cni.sh"]
|
||||||
env:
|
env:
|
||||||
# Name of the CNI config file to create.
|
# Name of the CNI config file to create.
|
||||||
|
@ -748,7 +748,7 @@ spec:
|
||||||
# Adds a Flex Volume Driver that creates a per-pod Unix Domain Socket to allow Dikastes
|
# Adds a Flex Volume Driver that creates a per-pod Unix Domain Socket to allow Dikastes
|
||||||
# to communicate with Felix over the Policy Sync API.
|
# to communicate with Felix over the Policy Sync API.
|
||||||
- name: flexvol-driver
|
- name: flexvol-driver
|
||||||
image: calico/pod2daemon-flexvol:v3.9.1
|
image: calico/pod2daemon-flexvol:v3.9.3
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: flexvol-driver-host
|
- name: flexvol-driver-host
|
||||||
mountPath: /host/driver
|
mountPath: /host/driver
|
||||||
|
@ -757,7 +757,7 @@ spec:
|
||||||
# container programs network policy and routes on each
|
# container programs network policy and routes on each
|
||||||
# host.
|
# host.
|
||||||
- name: calico-node
|
- name: calico-node
|
||||||
image: calico/node:v3.9.1
|
image: calico/node:v3.9.3
|
||||||
env:
|
env:
|
||||||
# Use Kubernetes API as the backing datastore.
|
# Use Kubernetes API as the backing datastore.
|
||||||
- name: DATASTORE_TYPE
|
- name: DATASTORE_TYPE
|
||||||
|
@ -903,7 +903,7 @@ spec:
|
||||||
- name: flexvol-driver-host
|
- name: flexvol-driver-host
|
||||||
hostPath:
|
hostPath:
|
||||||
type: DirectoryOrCreate
|
type: DirectoryOrCreate
|
||||||
path: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/nodeagent~uds
|
path: "{{- or .Kubelet.VolumePluginDirectory "/usr/libexec/kubernetes/kubelet-plugins/volume/exec/" }}nodeagent~uds"
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -956,7 +956,7 @@ spec:
|
||||||
priorityClassName: system-cluster-critical
|
priorityClassName: system-cluster-critical
|
||||||
containers:
|
containers:
|
||||||
- name: calico-kube-controllers
|
- name: calico-kube-controllers
|
||||||
image: calico/kube-controllers:v3.9.1
|
image: calico/kube-controllers:v3.9.3
|
||||||
env:
|
env:
|
||||||
# Choose which controllers to run.
|
# Choose which controllers to run.
|
||||||
- name: ENABLED_CONTROLLERS
|
- name: ENABLED_CONTROLLERS
|
||||||
|
|
|
@ -828,7 +828,7 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {
|
||||||
"k8s-1.6": "2.6.9-kops.1",
|
"k8s-1.6": "2.6.9-kops.1",
|
||||||
"k8s-1.7": "2.6.12-kops.1",
|
"k8s-1.7": "2.6.12-kops.1",
|
||||||
"k8s-1.7-v3": "3.8.0-kops.2",
|
"k8s-1.7-v3": "3.8.0-kops.2",
|
||||||
"k8s-1.12": "3.9.1-kops.3",
|
"k8s-1.12": "3.9.3-kops.1",
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue