Skip to content

Conversation

@kfirtoledo
Copy link
Collaborator

@kfirtoledo kfirtoledo commented Jan 11, 2024

Add support to:

  1. Create cl-secret.yaml that contains all the certificates for the controlplane and dataplane.
  2. Create cl-instance.yaml that use to deploy the ClusterLink project via the operator.

- kind: ServiceAccount
name: default
namespace: default`
operatorTemplate = `apiVersion: clusterlink.net/v1alpha1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this yaml be appended to others? Perhaps it's best to prepend with ---?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is stand-alone and just for the operator. If in the future, for some reason we decide to do that, we can add it.

const (
k8sTemplate = `---
certsTemplate = `---
apiVersion: v1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since there is no namespace, won't everything be deployed into default? Is that what we need at this time (i.e., can change the namespace later on)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes in the future it will be in the clusterlink namespace

}

var certConfig bytes.Buffer
t := template.Must(template.New("").Parse(certsTemplate))
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIUC, all secrets are added as inlined byte arrays (base64 of the cert). Have you considered using k8s object references instead, so that the actual credentials are in secrets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As we spoke secrets are not part of the operator, but part of the controlplane/dataplane we can open an issue about that. (@orozery)

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes - please do open an issue. If the secret are added as independent object (which I think they should be since that would allow for easier rotation by existing tools), then we should track this incomplete item

@kfirtoledo kfirtoledo changed the title cmd/cl-adm: Introduce cl-secret.yaml and clusterlink.yaml cmd/cl-adm: Introduce cl-secret.yaml and cl-instance.yaml Jan 18, 2024
@kfirtoledo kfirtoledo force-pushed the operator_cl_adm branch 2 times, most recently from 06e4686 to e176cb8 Compare January 18, 2024 06:51
@kfirtoledo kfirtoledo requested a review from elevran January 18, 2024 06:55
Copy link
Collaborator

@elevran elevran left a comment

Choose a reason for hiding this comment

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

note the request to open an issue and handle secret as ObjectReference and not embedded byte array

Add support to:
1. Create `cl-secret.yaml` that contains all the certificates for the controlplane and dataplane.
2. Create `clusterlink.yaml` that use to deploy the ClusterLink project via the operator.

Signed-off-by: Kfir Toledo <[email protected]>
@kfirtoledo kfirtoledo merged commit f3f1dbf into clusterlink-net:main Jan 25, 2024
@kfirtoledo kfirtoledo deleted the operator_cl_adm branch January 25, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants