Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions manifests/bootstrap-pod-v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
apiVersion: v1
kind: Pod
metadata:
name: bootstrap-machine-config-operator
namespace: {{.TargetNamespace}}
spec:
initContainers:
- name: machine-config-controller
image: {{.Images.MachineConfigController}}
args:
- "bootstrap"
- "--manifest-dir=/etc/mcc/bootstrap"
- "--dest-dir=/etc/mcs/bootstrap"
- "--pull-secret=/etc/mcc/bootstrap/machineconfigcontroller-pull-secret"
resources:
limits:
cpu: 20m
memory: 50Mi
requests:
cpu: 20m
memory: 50Mi
securityContext:
privileged: true
volumeMounts:
- name: bootstrap-manifests
mountPath: /etc/mcc/bootstrap
- name: server-basedir
mountPath: /etc/mcs/bootstrap
containers:
- name: machine-config-server
image: {{.Images.MachineConfigServer}}
args:
- "bootstrap"
volumeMounts:
- name: server-certs
mountPath: /etc/ssl/mcs
- name: bootstrap-kubeconfig
mountPath: /etc/kubernetes/kubeconfig
- name: server-basedir
mountPath: /etc/mcs/bootstrap
securityContext:
privileged: true
hostNetwork: true
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
restartPolicy: Always
volumes:
- name: server-certs
hostPath:
path: /etc/ssl/mcs
- name: bootstrap-kubeconfig
hostPath:
path: /etc/mcs/kubeconfig
- name: server-basedir
hostPath:
path: /etc/mcs/bootstrap
- name: bootstrap-manifests
hostPath:
path: /etc/mcc/bootstrap
81 changes: 81 additions & 0 deletions pkg/operator/assets/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions pkg/operator/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,28 @@ func RenderBootstrap(
}, {
data: filesData[pullSecretFile],
filename: "manifests/machineconfigcontroller-pull-secret",
}, {
// new directories for mco bootstrapping.
name: "manifests/machineconfigcontroller/controllerconfig.yaml",
filename: "bootstrap/manifests/machineconfigcontroller-controllerconfig.yaml",
}, {
name: "manifests/master.machineconfigpool.yaml",
filename: "bootstrap/manifests/master.machineconfigpool.yaml",
}, {
name: "manifests/worker.machineconfigpool.yaml",
filename: "bootstrap/manifests/worker.machineconfigpool.yaml",
}, {
name: "manifests/bootstrap-pod-v2.yaml",
filename: "bootstrap/machineconfigoperator-bootstrap-pod.yaml",
}, {
data: filesData[pullSecretFile],
filename: "bootstrap/manifests/machineconfigcontroller-pull-secret",
}, {
name: "manifests/machineconfigserver/csr-approver-role-binding.yaml",
filename: "manifests/csr-approver-role-binding.yaml",
}, {
name: "manifests/machineconfigserver/csr-bootstrap-role-binding.yaml",
filename: "manifests/csr-bootstrap-role-binding.yaml",
}}
for _, m := range manifests {
glog.Info(m)
Expand Down