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

Deploy OS UI (Whisker) with Goldmane #3775

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Brian-McM
Copy link
Contributor

Description

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files
  • If changing versions, run make gen-versions

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

Copy link
Member

@caseydavenport caseydavenport left a comment

Choose a reason for hiding this comment

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

Very first pass. I think building tooling to more consistently, easily, and reliably construct common Objects is probably a good idea, but I do worry about the work required to roll this out across the board and the likelihood of us ending up needing to maintain multiple different ways of constructing objects as a result. So I'm on the fence about shipping it as part of this PR - let's see what @tmjd and @rene-dekker have to say.

@caseydavenport
Copy link
Member

metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Status WhiskerStatus `json:"status,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

We'll need to add container overrides to everything this deploys. I'm OK for that to be a follow-up, but I also think it should be rather trivial to add now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you're cool with it I'm going to defer it, I tracked it in a ticket. Not sure if goldmane is going to stay here so kind of want to leave overrides until we sort that out.


var log = logf.Log.WithName(controllerName)

// Add creates a new ManagementClusterConnection Controller and adds it to the Manager. The Manager will set fields on the Controller
Copy link
Member

Choose a reason for hiding this comment

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

Still copy/paste error in this comment

},
{
APIGroups: []string{"projectcalico.org"},
Resources: []string{"felixconfigurations"},
Copy link
Member

Choose a reason for hiding this comment

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

Hm, what accesses felixconfigurations from this deployment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

UI APIs seems to need it when it's connected.

{
APIGroups: []string{"*"},
Resources: []string{"*"},
Verbs: []string{"get", "list", "watch"},
Copy link
Member

Choose a reason for hiding this comment

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

Should remove this wildcard permission

}

func (c *Component) clusterRole() *rbacv1.ClusterRole {
policyRules := []rbacv1.PolicyRule{
Copy link
Member

Choose a reason for hiding this comment

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

Goldmane needs access to ConfigMaps in its own Namespace (should be done via a Role not ClusterRole, though)

@Brian-McM Brian-McM marked this pull request as ready for review February 20, 2025 22:22
@Brian-McM Brian-McM requested a review from a team as a code owner February 20, 2025 22:22
for _, secretName := range []string{
monitor.PrometheusServerTLSSecretName,
whisker.ManagedClusterConnectionSecretName,
"whisker-trusted-bundle",
Copy link
Member

Choose a reason for hiding this comment

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

This is not a secret.

@@ -99,6 +99,10 @@ func createTrustedBundle(includeSystemBundle bool, name string, ca CertificateIn
return bundle, err
}

func (t *trustedBundle) SetName(name string) {
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather that we follow the established pattern and have the existing controller (core_controller in this case) add the certificates.

Name: "PUSH_URL",
Value: "https://localhost:8080/api/v1/flows/bulk"})
volumeMounts = []corev1.VolumeMount{
secretMount("/certs", c.cfg.LinseedPublicCASecret),
Copy link
Member

Choose a reason for hiding this comment

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

How does this secret get into the namespace? I don't see it rendered in the PR, unless I'm missing something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's via the install manifest retrieved from CC.

c.clusterRoleBinding(),
c.goldmaneService(),
c.whiskerService(),
c.cfg.TrustedCertBundle.ConfigMap(WhiskerNamespace))
Copy link
Member

Choose a reason for hiding this comment

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

This is not how we render the bundle elsewhere. I'd rather have us use the established pattern.

Scheme *runtime.Scheme
}

// +kubebuilder:rbac:groups=operator.tigera.io,resources=managementclusterconnections,verbs=get;list;watch;create;update;patch;delete
Copy link
Member

Choose a reason for hiding this comment

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

The comments in this file are incorrect

return nil
}

statusManager := status.New(mgr.GetClient(), "gold-rush", opts.KubernetesVersion)
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason and meaning for this name? Wouldn't it be better if we stick with whisker?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is left over from some previous naming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants