Added upgrade story from manifest pod to ds

This commit is contained in:
Piotr Szczesniak 2016-12-13 16:18:00 +01:00
parent a52637f09f
commit c00e57789d
4 changed files with 14 additions and 3 deletions

View File

@ -34,6 +34,8 @@ spec:
- name: varlibdockercontainers
mountPath: /var/lib/docker/containers
readOnly: true
nodeSelector:
alpha.kubernetes.io/fluentd-ds-ready: "true"
terminationGracePeriodSeconds: 30
volumes:
- name: varlog

View File

@ -42,6 +42,8 @@ spec:
readOnly: true
- name: libsystemddir
mountPath: /host/lib
nodeSelector:
alpha.kubernetes.io/fluentd-ds-ready: "true"
terminationGracePeriodSeconds: 30
volumes:
- name: varlog

View File

@ -27,6 +27,12 @@ const (
LabelOS = "beta.kubernetes.io/os"
LabelArch = "beta.kubernetes.io/arch"
// Historically fluentd was a manifest pod the was migrated to DaemonSet.
// To avoid situation during cluster upgrade when there are two instances
// of fluentd running on a node, kubelet need to mark node on which
// fluentd in not running as a manifest pod with LabelFluentdDsReady.
LabelFluentdDsReady = "alpha.kubernetes.io/fluentd-ds-ready"
)
// Role labels are applied to Nodes to mark their purpose. In particular, we

View File

@ -193,9 +193,10 @@ func (kl *Kubelet) initialNode() (*v1.Node, error) {
ObjectMeta: v1.ObjectMeta{
Name: string(kl.nodeName),
Labels: map[string]string{
metav1.LabelHostname: kl.hostname,
metav1.LabelOS: goruntime.GOOS,
metav1.LabelArch: goruntime.GOARCH,
metav1.LabelHostname: kl.hostname,
metav1.LabelOS: goruntime.GOOS,
metav1.LabelArch: goruntime.GOARCH,
metav1.LabelFluentdDsReady: "true",
},
},
Spec: v1.NodeSpec{