Skip to content
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

Use MachineConfigOperator instead of TNCO #232

Merged
merged 2 commits into from
Sep 12, 2018

Conversation

abhinavdahiya
Copy link
Contributor

@abhinavdahiya abhinavdahiya commented Sep 11, 2018

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 11, 2018
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 11, 2018
@abhinavdahiya abhinavdahiya force-pushed the tnco_to_mco branch 3 times, most recently from 163ebc4 to 9518ab5 Compare September 11, 2018 19:17
@abhinavdahiya abhinavdahiya changed the title WIP: Use MachineConfigOperator instead of TNCO Use MachineConfigOperator instead of TNCO Sep 11, 2018
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 11, 2018
@crawford
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 11, 2018
// TNC certs
tncDomain := fmt.Sprintf("%s-tnc.%s", c.Name, c.BaseDomain)
// MachineConfigServer certs
mcsDomain := fmt.Sprintf("%s-tnc.%s", c.Name, c.BaseDomain)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to update the template to %s-mcs.%s or similar? And you probably want to make similar changes to pkg/asset/tls.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://jira.coreos.com/browse/CORS-833 is going to consolidate the api endpoints. So left it for now.

@yifan-gu
Copy link
Contributor

lgtm to me, same question as @wking pointed out.

@abhinavdahiya
Copy link
Contributor Author

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 11, 2018
# /etc/ssl/mcs/tls.{crt, key} are locations for MachineConfigServer's tls assets.
cp "$PWD/tls/machine-config-server.crt" /etc/ssl/mcs/tls.crt
cp "$PWD/tls/machine-config-server.key" /etc/ssl/mcs/tls.key
cp "$PWD/mco-bootstrap/machineconfigoperator-bootstrap-pod.yaml" /etc/kubernetes/manifests/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to be a local file. Is it created by the bootstrap rendering call above? I think this would be less brittle if we were able to volume-mount a handful of target directories, and then the installer could put its generated assets in the right places on its own. But if this is the only such file, than handling it explicitly here is probably an acceptable short-term solution.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need special logic for some operators that we need for bootstrapping the cluster:

# shellcheck disable=SC2154
/usr/bin/docker run \
--user 0 \
--volume "$PWD:/assets:z" \
"${tnc_operator_image}" \
--config=/assets/tnco-config.yaml \
--render-bootstrap=true \
--render-output=/assets/tnc-bootstrap
mkdir -p /etc/kubernetes/manifests/
cp "$PWD/tnc-bootstrap/tectonic-node-controller-pod.yaml" /etc/kubernetes/manifests/
cp "$PWD/tnc-bootstrap/tectonic-node-controller-config.yaml" /etc/kubernetes/tnc-config

cp -r "$PWD/bootstrap-configs" /etc/kubernetes/bootstrap-configs

Everything else is already present in the correct directory <something>/manifests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it created by the bootstrap rendering call above?

yes

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Sep 11, 2018
@rphillips
Copy link
Contributor

Are we bringing over the checkpointer in this PR as well?

@abhinavdahiya
Copy link
Contributor Author

@rphillips checkpointer is installed by kube-core-operator ??

@rphillips
Copy link
Contributor

looks like it is in kube-core-operator. thanks!

@@ -13,7 +13,6 @@ import (
"github.com/coreos/tectonic-config/config/kube-addon"
"github.com/coreos/tectonic-config/config/kube-core"
"github.com/coreos/tectonic-config/config/tectonic-network"
tnco "github.com/coreos/tectonic-config/config/tectonic-node-controller"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want a separate commit rebuilding BUILD.bazel and cleaning this our of vendor/.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used https://github.com/openshift/installer#go to create df62984. I didn't remove glide.lock, as i didn't want to update the whole world :/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't remove glide.lock, as i didn't want to update the whole world :/

Removing glide.lock wasn't too bad when I did it in 2018-08-30 in 2e835b0. But I'm fine punting the vendor/ cleanup down the road if you want.

@abhinavdahiya
Copy link
Contributor Author

requires openshift/machine-config-operator#54
#222 changed how the installconfig was rendered.

@wking
Copy link
Member

wking commented Sep 12, 2018

I landed openshift/machine-config-operator#54. I expect that will have bumped the v4.0.0 tag you're using in this PR automatically, so I'll just kick the tests again:

/retest

@crawford
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 12, 2018
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, crawford

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,crawford]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@abhinavdahiya
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 12, 2018
@openshift-merge-robot openshift-merge-robot merged commit 84ab99e into openshift:master Sep 12, 2018
@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws df62984 link /test e2e-aws
ci/prow/e2e-aws-smoke df62984 link /test e2e-aws-smoke
ci/prow/build-tarball df62984 link /test build-tarball

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@abhinavdahiya abhinavdahiya deleted the tnco_to_mco branch September 12, 2018 16:28
wking added a commit to wking/openshift-installer that referenced this pull request Sep 20, 2018
… cluster-api

Generated with:

  $ glide update --strip-vendor
  $ glide-vc --use-lock-file --no-tests --only-code
  $ bazel run //:gazelle

using:

  $ glide --version
  (cd $GOPATH/src/github.com/Masterminds/glide && git describe)
  v0.13.1-7-g3e13fd1
  $ (cd $GOPATH/src/github.com/sgotti/glide-vc && git describe)
  v0.1.0-2-g6ddf6ee
  $ bazel version
  Build label: 0.16.1- (@non-git)
  Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
  Build time: Mon Aug 13 16:42:29 2018 (1534178549)
  Build timestamp: 1534178549
  Build timestamp as int: 1534178549

The tectonic-node-controller removal catches us up with 596591b (.*:
replace tectonic node controller with machine config operator,
2018-09-10, openshift#232).

The cluster-api trim adjusts the content from b00e40e (vendor: Add
client from sigs.k8s.io/cluster-api, 2018-09-04, openshift#119).  Because
cluster-api wasn't in glide.lock, I suspect neither glide nor glide-vc
were run before that commit.
wking added a commit to wking/openshift-installer that referenced this pull request Sep 20, 2018
… cluster-api

Generated with:

  $ glide update --strip-vendor
  $ glide-vc --use-lock-file --no-tests --only-code
  $ bazel run //:gazelle

using:

  $ glide --version
  (cd $GOPATH/src/github.com/Masterminds/glide && git describe)
  v0.13.1-7-g3e13fd1
  $ (cd $GOPATH/src/github.com/sgotti/glide-vc && git describe)
  v0.1.0-2-g6ddf6ee
  $ bazel version
  Build label: 0.16.1- (@non-git)
  Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
  Build time: Mon Aug 13 16:42:29 2018 (1534178549)
  Build timestamp: 1534178549
  Build timestamp as int: 1534178549

The tectonic-node-controller removal catches us up with 596591b (.*:
replace tectonic node controller with machine config operator,
2018-09-10, openshift#232).

The cluster-api trim adjusts the content from b00e40e (vendor: Add
client from sigs.k8s.io/cluster-api, 2018-09-04, openshift#119).  Because
cluster-api wasn't in glide.lock, I suspect neither glide nor glide-vc
were run before that commit.
wking added a commit to wking/openshift-installer that referenced this pull request Sep 20, 2018
… cluster-api

Generated with:

  $ glide update --strip-vendor
  $ glide-vc --use-lock-file --no-tests --only-code
  $ bazel run //:gazelle

using:

  $ glide --version
  (cd $GOPATH/src/github.com/Masterminds/glide && git describe)
  v0.13.1-7-g3e13fd1
  $ (cd $GOPATH/src/github.com/sgotti/glide-vc && git describe)
  v0.1.0-2-g6ddf6ee
  $ bazel version
  Build label: 0.16.1- (@non-git)
  Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
  Build time: Mon Aug 13 16:42:29 2018 (1534178549)
  Build timestamp: 1534178549
  Build timestamp as int: 1534178549

The tectonic-node-controller removal catches us up with 596591b (.*:
replace tectonic node controller with machine config operator,
2018-09-10, openshift#232).

The cluster-api trim adjusts the content from b00e40e (vendor: Add
client from sigs.k8s.io/cluster-api, 2018-09-04, openshift#119).  Because
cluster-api wasn't in glide.lock, I suspect neither glide nor glide-vc
were run before that commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants