-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6916 from smarterclayton/static_masters
Automatic merge from submit-queue. Make openshift-ansible use static pods to install the control plane, make nodes prefer bootstrapping 1. Nodes continue to be configured for bootstrapping (as today) 2. For bootstrap nodes, we write a generic bootstrap-node-config.yaml that contains static pod references and any bootstrap config, and then use that to start a child kubelet using `--write-flags` instead of launching the node ourselves. If a node-config.yaml is laid down in `/etc/origin/node` it takes precedence. 3. For 3.10 we want dynamic node config from Kubernetes to pull down additional files, but there are functional gaps. For now, the openshift SDN container has a sidecar that syncs node config to disk and updates labels (kubelet doesn't update labels, kubernetes/kubernetes#59314) 4. On the masters, if openshift_master_bootstrap_enabled we generate the master-config.yaml and the etcd config, but we don't start etcd or the masters (no services installed) 5. On the masters, we copy the static files into the correct pod-manifest-path (/etc/origin/node/pods) or similar 6. The kubelet at that point should automatically pick up the new static files and launch the components 7. We wait for them to converge 8. We install openshift-sdn as the first component, which allows nodes to go ready and start installing things. There is a gap here where the masters are up, the nodes can bootstrap, but the nodes are not ready because no network plugin is installed. Challenges at this point: * The master shims (`master-logs` and `master-restart`) need to deal with CRI-O and systemd. Ideally this is a temporary shim until we remove systemd for these components and have cri-ctl installed. * We need to test failure modes of the static pods * Testing Further exploration things: * need to get all the images using image streams or properly replaced into the static pods * need to look at upgrades and updates * disk locations become our API (`/var/lib/origin`, `/var/lib/etcd`) - how many customers have fiddled with this? * may need to make the kubelet halt if it hasn't been able to get server/client certs within a bounded window (5m?) so to ensure that autoheals happen (openshift/origin#18430) * have to figure out whether dynamic kubelet config is a thing we can rely on for 3.10 (@liggitt), and what gaps there are with dynamic reconfig * client-ca.crt is not handled by bootstrapping or dynamic config. This needs a solution unless we keep the openshift-sdn sidecar around * kubelet doesn't send sd notify to systemd (kubernetes/kubernetes#59079) @derekwaynecarr @sdodson @liggitt @deads2k this is the core of self-hosting.
- Loading branch information
Showing
84 changed files
with
2,289 additions
and
551 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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,40 @@ | ||
kind: Pod | ||
apiVersion: v1 | ||
metadata: | ||
name: master-etcd | ||
namespace: kube-system | ||
labels: | ||
openshift.io/control-plane: "true" | ||
openshift.io/component: etcd | ||
spec: | ||
restartPolicy: Always | ||
hostNetwork: true | ||
containers: | ||
- name: etcd | ||
image: quay.io/coreos/etcd:v3.3 | ||
workingDir: /var/lib/etcd | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- | | ||
#!/bin/sh | ||
set -o allexport | ||
source /etc/etcd/etcd.conf | ||
exec etcd | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- mountPath: /etc/etcd/ | ||
name: master-config | ||
readOnly: true | ||
- mountPath: /var/lib/etcd/ | ||
name: master-data | ||
livenessProbe: | ||
tcpSocket: | ||
port: 2379 | ||
volumes: | ||
- name: master-config | ||
hostPath: | ||
path: /etc/etcd/ | ||
- name: master-data | ||
hostPath: | ||
path: /var/lib/etcd |
This file contains 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
Oops, something went wrong.