-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run kube controllers in a separate process #6735
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,12 +22,39 @@ ExecStart=/usr/bin/docker run --rm --privileged --net=host \ | |
{% if l_bind_docker_reg_auth | default(False) %} -v {{ oreg_auth_credentials_path }}:/root/.docker:ro{% endif %}\ | ||
{{ osm_image }}:${IMAGE_VERSION} start master controllers \ | ||
--config=${CONFIG_FILE} $OPTIONS | ||
ExecStartPre=-/usr/bin/docker rm -f {{ openshift_service_type}}-master-kube-controllers | ||
ExecStart=/usr/bin/docker run --rm --privileged --net=host \ | ||
--name {{ openshift_service_type }}-master-kube-controllers \ | ||
--env-file=/etc/sysconfig/{{ openshift_service_type }}-master-kube-controllers \ | ||
-v {{ r_openshift_master_data_dir }}:{{ r_openshift_master_data_dir }} \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v {{ openshift.common.config_base }}:{{ openshift.common.config_base }} \ | ||
{% if openshift_cloudprovider_kind | default('') != '' -%} -v {{ openshift.common.config_base }}/cloudprovider:{{ openshift.common.config_base}}/cloudprovider {% endif -%} \ | ||
-v /etc/pki:/etc/pki:ro \ | ||
{% if l_bind_docker_reg_auth | default(False) %} -v {{ oreg_auth_credentials_path }}:/root/.docker:ro{% endif %}\ | ||
{{ osm_image }}:${IMAGE_VERSION} start master controllers \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which part? {{ osm_image }} is part of the jinja template ${IMAGE_VERSION} is an environment variable set in EnvironmentFile |
||
--controllers="*" --controllers=-ttl --controllers=-bootstrapsigner --controllers=-tokencleaner --controllers=-horizontalpodautoscaling --controllers=-serviceaccount-token \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If an admin would ever want to modify this we should use an environment variable to define these so they can just edit /etc/sysconfig/origin-master and restart the service. |
||
--service-account-private-key-file=openshift.local.config/master/serviceaccounts.private.key \ | ||
--root-ca-file=openshift.local.config/master/ca-bundle.crt \ | ||
--kubeconfig=openshift.local.config/master/openshift-master.kubeconfig \ | ||
--pod-eviction-timeout=5m \ | ||
--enable-dynamic-provisioning=true \ | ||
--port=-1 \ | ||
--use-service-account-credentials=true \ | ||
--cluster-signing-cert-file="" \ | ||
--cluster-signing-key-file="" \ | ||
--leader-elect \ | ||
--leader-elect-retry-period=3s \ | ||
--leader-elect-resource-lock=configmaps \ | ||
--openshift-config=${CONFIG_FILE} | ||
ExecStartPost=/usr/bin/sleep 10 | ||
ExecStop=/usr/bin/docker stop {{ openshift_service_type }}-master-controllers | ||
ExecStop=/usr/bin/docker stop {{ openshift_service_type }}-master-kube-controllers | ||
LimitNOFILE=131072 | ||
LimitCORE=infinity | ||
WorkingDirectory={{ r_openshift_master_data_dir }} | ||
SyslogIdentifier={{ openshift_service_type }}-master-controllers | ||
SyslogIdentifier={{ openshift_service_type }}-master-kube-controllers | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will either blast both syslog identifiers with logs from both processes or it just won't work, need to check the docs. |
||
Restart=always | ||
RestartSec=5s | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,21 @@ Type=notify | |
EnvironmentFile=/etc/sysconfig/{{ openshift_service_type }}-master-controllers | ||
Environment=GOTRACEBACK=crash | ||
ExecStart=/usr/bin/openshift start master controllers --config=${CONFIG_FILE} $OPTIONS | ||
ExecStart=/usr/bin/hyperkube kube-controller-manager \ | ||
--controllers="*" --controllers=-ttl --controllers=-bootstrapsigner --controllers=-tokencleaner --controllers=-horizontalpodautoscaling --controllers=-serviceaccount-token \ | ||
--service-account-private-key-file=openshift.local.config/master/serviceaccounts.private.key \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do things like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't know. @sdodson ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be |
||
--root-ca-file=openshift.local.config/master/ca-bundle.crt \ | ||
--kubeconfig=openshift.local.config/master/openshift-master.kubeconfig \ | ||
--pod-eviction-timeout=5m \ | ||
--enable-dynamic-provisioning=true \ | ||
--port=-1 \ | ||
--use-service-account-credentials=true \ | ||
--cluster-signing-cert-file="" \ | ||
--cluster-signing-key-file="" \ | ||
--leader-elect \ | ||
--leader-elect-retry-period=3s \ | ||
--leader-elect-resource-lock=configmaps \ | ||
--openshift-config=${CONFIG_FILE} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting - I would have thought the other settings would come from openshift-config as well. Is that not the case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This file is needed for
I added comments here: https://github.com/openshift/origin/pull/18100/files#r161594020 I think we should try to follow kube when kube moves to its config, not double down on our own for those two settings. Then its a feature flag and we're only two patches away from running just like upstream (for good or for ill) |
||
LimitNOFILE=131072 | ||
LimitCORE=infinity | ||
WorkingDirectory={{ r_openshift_master_data_dir }} | ||
|
@@ -20,3 +35,5 @@ RestartSec=5s | |
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrunalp @runcom doesn't docker get really angry when you use
rm -f
? Or is docker ok with this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was usually related to some devmapper stuff, I doubt we have that issue anymore but yeah, Docker at least had an issue with rm -f