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

BUG 1684206: *: store etcd CA and client certs in cluster #1363

Merged
merged 2 commits into from
Mar 8, 2019

Conversation

abhinavdahiya
Copy link
Contributor

@abhinavdahiya abhinavdahiya commented Mar 4, 2019

xref: https://bugzilla.redhat.com/show_bug.cgi?id=1684206

This pushes the etcd ca into cluster to sign future etcd client CSR requests.
/cc @csrwng

@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 Mar 4, 2019
@abhinavdahiya abhinavdahiya changed the title *: store etcd CA and client certs in cluster BUG 1684206: *: store etcd CA and client certs in cluster Mar 5, 2019
…and certs in the cluster

The CA are stored as configmap for the purpose of establishing trust.

The CAs and client certs are stored as secrets for use inside the cluster.
@abhinavdahiya
Copy link
Contributor Author

rebase around #1291

@abhinavdahiya
Copy link
Contributor Author

/retest

apiVersion: v1
kind: Secret
metadata:
name: etcd-client-ca-deprecated
Copy link
Member

Choose a reason for hiding this comment

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

Why are we opening with a deprecated object?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why are we opening with a deprecated object?

no sure what you mean by that.

This mimics the deprecation comment on

// [DEPRECATED]

anf
EtcdClientCaCert: base64.StdEncoding.EncodeToString(etcdCA.Cert()),

@@ -9,12 +9,12 @@ import (
)

const (
pullFileName = "pull.yaml.template"
pullFileName = "pull.json.template"
Copy link
Member

Choose a reason for hiding this comment

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

This seems unrelated?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see from the commit message:

fixes the template for pull as the contents were json but file was names yaml

But JSON is a subset of YAML, so .yaml was accurate, but less specific. Anyhow, I'm fine with this rename if you don't want to bother splitting it out ;).

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 have mentioned that in c52894b

modifies the manifest target to use the filename from template assets, rather than duplicating the filename.

fixes the template for pull as the contents were json but file was names yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so mco requires the file name to be pull.json

and when I was making the change it got confused wriring the write file name to write asset.... :( so I made the change c52894b

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 for consistency between the name of the template and the name of the file generated.

} {
dependencies.Get(a)
for _, f := range a.Files() {
assetData[strings.TrimSuffix(filepath.Base(f.Filename), ".template")] = applyTemplateData(f.Data, templateData)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a welcome change over what was being done. We don't need the assetData map as a temporary home. We can add the file directly to a *assetFile slice here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

modifies the manifest asset to use the filename from template assets, rather than duplicating the filename.

fixes the template for pull as the contents were json but file was named .yaml
@staebler
Copy link
Contributor

staebler commented Mar 8, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 8, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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,staebler]

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

@openshift-merge-robot openshift-merge-robot merged commit 12af0c9 into openshift:master Mar 8, 2019
wking added a commit to wking/openshift-installer that referenced this pull request Mar 26, 2019
Catching up with 53c6fc3 (assets/manifests: push etcd configmaps
and secrets into cluster, 2019-03-04, openshift#1363).  Generated with:

  $ openshift-install graph | dot -Tsvg >docs/design/resource_dep.svg

using:

  $ dot -V
  dot - graphviz version 2.30.1 (20170916.1124)
wking added a commit to wking/openshift-installer that referenced this pull request Mar 26, 2019
Catching up with 53c6fc3 (assets/manifests: push etcd configmaps
and secrets into cluster, 2019-03-04, openshift#1363).  Generated with:

  $ openshift-install graph | dot -Tsvg >docs/design/resource_dep.svg

using:

  $ dot -V
  dot - graphviz version 2.30.1 (20170916.1124)
wking added a commit to wking/openshift-installer that referenced this pull request Mar 26, 2019
Catching up with 53c6fc3 (assets/manifests: push etcd configmaps
and secrets into cluster, 2019-03-04, openshift#1363).  Generated with:

  $ openshift-install graph | dot -Tsvg >docs/design/resource_dep.svg

using:

  $ dot -V
  dot - graphviz version 2.30.1 (20170916.1124)
wking added a commit to wking/openshift-installer that referenced this pull request Mar 26, 2019
Catching up with 53c6fc3 (assets/manifests: push etcd configmaps
and secrets into cluster, 2019-03-04, openshift#1363).  Generated with:

  $ openshift-install graph | dot -Tsvg >docs/design/resource_dep.svg

using:

  $ dot -V
  dot - graphviz version 2.30.1 (20170916.1124)
wking added a commit to wking/openshift-installer that referenced this pull request Mar 26, 2019
Catching up with 53c6fc3 (assets/manifests: push etcd configmaps
and secrets into cluster, 2019-03-04, openshift#1363).  Generated with:

  $ openshift-install graph | dot -Tsvg >docs/design/resource_dep.svg

using:

  $ dot -V
  dot - graphviz version 2.30.1 (20170916.1124)
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.

5 participants