Skip to content

Commit

Permalink
Merge pull request #8062 from hakman/fix-flexvol
Browse files Browse the repository at this point in the history
Fix mounting Calico "flexvol-driver-host" in CoreOS
  • Loading branch information
k8s-ci-robot committed Dec 9, 2019
2 parents b436440 + dfee054 commit fd34b98
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
11 changes: 11 additions & 0 deletions cmd/kops/update_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,17 @@ func RunUpdateCluster(f *util.Factory, clusterName string, out io.Writer, c *Upd
}
for i := range list.Items {
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/"
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ spec:
serviceAccountName: calico-node
priorityClassName: system-cluster-critical
containers:
- image: calico/typha:v3.9.1
- image: calico/typha:v3.9.3
name: calico-typha
ports:
- containerPort: 5473
Expand Down Expand Up @@ -694,7 +694,7 @@ spec:
# It can be deleted if this is a fresh installation, or if you have already
# upgraded to use calico-ipam.
- name: upgrade-ipam
image: calico/cni:v3.9.1
image: calico/cni:v3.9.3
command: ["/opt/cni/bin/calico-ipam", "-upgrade"]
env:
- name: KUBERNETES_NODE_NAME
Expand All @@ -714,7 +714,7 @@ spec:
# This container installs the CNI binaries
# and CNI network config file on each node.
- name: install-cni
image: calico/cni:v3.9.1
image: calico/cni:v3.9.3
command: ["/install-cni.sh"]
env:
# Name of the CNI config file to create.
Expand Down Expand Up @@ -748,7 +748,7 @@ spec:
# 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.
- name: flexvol-driver
image: calico/pod2daemon-flexvol:v3.9.1
image: calico/pod2daemon-flexvol:v3.9.3
volumeMounts:
- name: flexvol-driver-host
mountPath: /host/driver
Expand All @@ -757,7 +757,7 @@ spec:
# container programs network policy and routes on each
# host.
- name: calico-node
image: calico/node:v3.9.1
image: calico/node:v3.9.3
env:
# Use Kubernetes API as the backing datastore.
- name: DATASTORE_TYPE
Expand Down Expand Up @@ -903,7 +903,7 @@ spec:
- name: flexvol-driver-host
hostPath:
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
Expand Down Expand Up @@ -956,7 +956,7 @@ spec:
priorityClassName: system-cluster-critical
containers:
- name: calico-kube-controllers
image: calico/kube-controllers:v3.9.1
image: calico/kube-controllers:v3.9.3
env:
# Choose which controllers to run.
- name: ENABLED_CONTROLLERS
Expand Down
2 changes: 1 addition & 1 deletion upup/pkg/fi/cloudup/bootstrapchannelbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ func (b *BootstrapChannelBuilder) buildAddons() *channelsapi.Addons {
"k8s-1.6": "2.6.9-kops.1",
"k8s-1.7": "2.6.12-kops.1",
"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",
}

{
Expand Down

0 comments on commit fd34b98

Please sign in to comment.