Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Conversation

rossf7
Copy link
Contributor

@rossf7 rossf7 commented Mar 28, 2017

Towards giantswarm/giantswarm#1255

This PR adds example certs for each cluster component. The actual certificate TPOs will be created by kubernetesd using data from the cluster TPO but there are some gaps currently.

  • apiserver
  • worker
  • etcd
  • calico

I'd like to get these TPOs as close to the actual ones as possible. I'll then automate in kubernetesd. For now I've agreed with @asymmetric that we'll use the default namespace. This is while we decide if the TPOs should live in the cluster namespace.

@rossf7 rossf7 self-assigned this Mar 28, 2017
@@ -1,20 +1,20 @@
apiVersion: "giantswarm.io/v1"
kind: Certificate
metadata:
name: "example-cert"
name: "uo91f-apiserver"
namespace: "uo91f"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should the TPOs be in the "per cluster" or the giantswarm namespace?

spec:
clusterID: "uo91f"
clusterComponent: "calico"
commonName: "calico.uo91f.g8s.eu-west-1.aws.test.private.giantswarm.io"
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 the calico domain correct? It isn't in the clustertpr, should we add it?

https://github.com/giantswarm/clustertpr/blob/master/calico/calico.go

commonName: "api.uo91f.g8s.eu-west-1.aws.test.private.giantswarm.io"
altNames:
- "uo91f.g8s.eu-west-1.aws.test.private.giantswarm.io"
- "k8s-master-vm"
Copy link
Member

Choose a reason for hiding this comment

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

why does the worker cert need these alt names? these are the api server ANs aren't they?

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 think that's an error on my side, I'll remove them. I'd like to get these examples as close as possible and then I can automate in kubernetesd.

@puja108
Copy link
Member

puja108 commented Mar 28, 2017

There's 2 sides to the TPO namespace issue:

  1. I was thinking that TPO could be independent of namespace and either kubernetesd or some operator creates the namespace based on it.
  2. Thinking about it a bit more the TPO actually belongs to the cluster just like the deployments and secrets to and having everythin gpertaining to a single cluster live in a separate namespace would help with order and cleaning up (e.g. cleaning up after a deleted cluster is just deleting the whole namespace).

So now I'm a bit more tending toward 2

spec:
clusterID: "uo91f"
clusterComponent: "calico"
commonName: "calico.uo91f.g8s.eu-west-1.aws.test.private.giantswarm.io"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xh3b4sd the Calico domain is missing from clustertpr. Can we add it and is the example correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

See

Feel free to do that in case your are blocked by it somehow. The domains for the guest cluster components have all the same structure and only differ in their sub domain. I don't know how the base domain of AWS clusters look like. And note that the kube DNS domain is a completely different thing structure wise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xh3b4sd will do if it blocks me. Also sorry about forgetting my own issues!

@rossf7 rossf7 requested a review from xh3b4sd March 28, 2017 11:01
spec:
clusterID: "uo91f"
clusterComponent: "worker"
commonName: "api.uo91f.g8s.eu-west-1.aws.test.private.giantswarm.io"
Copy link
Contributor

Choose a reason for hiding this comment

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

Common name for the worker is worker, not api.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks I'll fix.

clusterComponent: "kubernetes"
commonName: "api.cert-test.g8s.eu-west-1.aws.test.private.giantswarm.io"
clusterID: "uo91f"
clusterComponent: "apiserver"
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer api over apiserver. The scheme for the other certs is to use the clusterComponent as sub domain identifier. The only exception is here.

@rossf7 rossf7 requested a review from JosephSalisbury April 5, 2017 14:51
@rossf7 rossf7 merged commit fd37093 into master Apr 5, 2017
@rossf7 rossf7 deleted the example-certs branch April 5, 2017 16:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants