Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bootstrap/cloud/terraform/registry.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ locals {
google_service_account.human-acl.member,
var.onprem_federation ? [google_service_account.robot-service[0].member] : [],
])
# TODO: use the regional repos depending on settings in the future
# TODO(ensonic): use the regional repos depending on settings in the future
private_repo_access = flatten([
for sa in local.service_acounts : [
for prj in var.private_image_repositories : {
Expand Down
4 changes: 2 additions & 2 deletions src/go/cmd/cr-syncer-auth-webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (h *handlers) verifyJWT(encodedJWT string) error {
}

func (h *handlers) resourceIsFiltered(groupKind string) bool {
// TODO: limit to CRDs with filter-by-robot-name label in case someone adds
// TODO(rodrigoq): limit to CRDs with filter-by-robot-name label in case someone adds
// new unfiltered resources in future.
return groupKind != "registry.cloudrobotics.com/robottypes"
}
Expand All @@ -126,7 +126,7 @@ func (h *handlers) validateRequest(r *http.Request, robotName string) error {
return nil
}

// TODO: check against label of upstream resource instead of assuming that
// TODO(rodrigoq): check against label of upstream resource instead of assuming that
// robot xyz can access all syncable resources matching *xyz.
if incomingReq.RobotName != robotName && !strings.HasSuffix(incomingReq.ResourceName, robotName) {
slog.Error("robot impersonation rejected",
Expand Down
2 changes: 1 addition & 1 deletion src/go/pkg/controller/approllout/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func Add(ctx context.Context, mgr manager.Manager, baseValues chartutil.Values)
source.Kind(mgr.GetCache(), kclient.Object(&apps.ChartAssignment{}),
// We manually enqueue for the owner reference since handler.EnqueueRequestForOwner
// does not work.
// TODO: There is an associated bug in the controller-runtime but upgrading to include
// TODO(ensonic): There is an associated bug in the controller-runtime but upgrading to include
// https://github.com/kubernetes-sigs/controller-runtime/pull/274 did not resolve the issue.
&handler.Funcs{
DeleteFunc: func(ctx context.Context, evt event.DeleteEvent, q workQueue) {
Expand Down
4 changes: 2 additions & 2 deletions src/go/pkg/controller/chartassignment/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ func loadAndExpandChart(as *apps.ChartAssignment) ([]*unstructured.Unstructured,
if err != nil {
return nil, false, fmt.Errorf("render chart: %w", err)
}
// TODO: consider giving the synk package first-class support for raw manifests
// TODO(ensonic): consider giving the synk package first-class support for raw manifests
// so that their decoding errors are fully surfaced in the ResourceSet. Otherwise,
// common YAML errors will only be surfaced one-by-one, which is tedious to handle.
res, err := decodeManifests(manifests)
Expand Down Expand Up @@ -342,7 +342,7 @@ func loadChart(cspec *apps.AssignedChart) (*chart.Chart, string, error) {
return nil, "", fmt.Errorf("load chart requirements: %w", err)
}

// TODO: handle empty c.Values, cspec.Values
// TODO(ensonic): handle empty c.Values, cspec.Values
// Build the full set of values including the default ones. Even though
// they are part of the chart, they are ignored if we don't provide
// them explicitly.
Expand Down
14 changes: 7 additions & 7 deletions src/go/pkg/synk/synk.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func NewForConfig(cfg *rest.Config) (*Synk, error) {
return New(client, cachedDiscovery), nil
}

// TODO: determine options that allow us to be semantically compatible with
// TODO(freinartz): determine options that allow us to be semantically compatible with
// vanilla kubectl apply.
type ApplyOptions struct {
name string
Expand Down Expand Up @@ -444,7 +444,7 @@ func (s *Synk) initialize(
if err := s.populateNamespaces(ctx, opts.Namespace, crds, regulars...); err != nil {
return nil, nil, fmt.Errorf("set default namespaces: %w", err)
}
// TODO: consider putting this and other validation as a step after initialize
// TODO(freinartz): consider putting this and other validation as a step after initialize
// so we can give validation errors in batch in the ResourceSet status.
if opts.EnforceNamespace {
for _, r := range regulars {
Expand Down Expand Up @@ -684,7 +684,7 @@ func replace(ctx context.Context, client dynamic.ResourceInterface, resource *un

func (s *Synk) applyOne(ctx context.Context, resource *unstructured.Unstructured, set *apps.ResourceSet) (apps.ResourceAction, error) {
// If name is unset, we'd retrieve a list below and panic.
// TODO: This may be valid if generateName is set instead. In this case we
// TODO(freinartz): This may be valid if generateName is set instead. In this case we
// want to create the resource in any case.
if resource.GetName() == "" {
return apps.ResourceActionNone, fmt.Errorf("missing resource name for %s", resource.GroupVersionKind().String())
Expand Down Expand Up @@ -773,13 +773,13 @@ func (s *Synk) applyOne(ctx context.Context, resource *unstructured.Unstructured
)
obj, err := scheme.Scheme.New(mapping.GroupVersionKind)
if err == nil {
// TODO: add option to dynamically load patch meta from discovery API
// TODO(ensonic): add option to dynamically load patch meta from discovery API
// for full kubectl compatibility.
patchMeta, err := strategicpatch.NewPatchMetaFromStruct(obj)
if err != nil {
return apps.ResourceActionNone, fmt.Errorf("lookup patch meta: %w", err)
}
// TODO: Make overwrite boolean configurable for full kubectl compatibility.
// TODO(ensonic): Make overwrite boolean configurable for full kubectl compatibility.
patch, err = strategicpatch.CreateThreeWayMergePatch(
originalRaw, resourceRaw, currentRaw,
patchMeta, true,
Expand Down Expand Up @@ -1033,7 +1033,7 @@ func (s *Synk) deleteFailedResourceSets(ctx context.Context, name string, versio
if !ok || n != name || v >= version {
continue
}
// TODO: should we possibly opt for foreground deletion here so
// TODO(freinartz): should we possibly opt for foreground deletion here so
// we only return after all dependents have been deleted as well?
// kubectl doesn't allow to opt into foreground deletion in general but
// here it would likely bring us closer to the apply --prune semantics.
Expand All @@ -1060,7 +1060,7 @@ func (s *Synk) deleteResourceSets(ctx context.Context, name string, version int3
if !ok || n != name || v >= version {
continue
}
// TODO: should we possibly opt for foreground deletion here so
// TODO(freinartz): should we possibly opt for foreground deletion here so
// we only return after all dependents have been deleted as well?
// kubectl doesn't allow to opt into foreground deletion in general but
// here it would likely bring us closer to the apply --prune semantics.
Expand Down
Loading