Skip to content

Commit

Permalink
fix: change relays annotation of Cluster to paralus.dev/relays (#227)
Browse files Browse the repository at this point in the history
Signed-off-by: niravparikh05 <nir.parikh05@gmail.com>
  • Loading branch information
niravparikh05 committed Jun 26, 2023
1 parent fed74b6 commit 749dcb4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/cluster/fixtures/data/download.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ metadata:
app.kubernetes.io/managed-by: paralus
data:
clusterID: {{if .Cluster.Metadata.Labels}}{{ index .Cluster.Metadata.Labels "paralus.dev/clusterID" }}{{end}}
relays: '{{if .Cluster.Metadata.Annotations}}{{- index .Cluster.Metadata.Annotations "relays" -}}{{end}}'
relays: '{{if .Cluster.Metadata.Annotations}}{{- index .Cluster.Metadata.Annotations "paralus.dev/relays" -}}{{end}}'
---
apiVersion: apps/v1
kind: Deployment
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconcile/cluster_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func (r *clusterReconciler) handleClusterBootstrapAgent(ctx context.Context, clu
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
defer cancel()

fmt.Print("annotations in reconciler :: ", cluster.Metadata.Annotations)
_log.Info("annotations in reconciler :: ", cluster.Metadata.Annotations)

err := r.cs.UpdateStatus(ctx, &infrav3.Cluster{
Metadata: cluster.Metadata,
Expand Down
2 changes: 1 addition & 1 deletion pkg/service/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ func (s *clusterService) CreateBootstrapAgentForCluster(ctx context.Context, clu
if cluster.Metadata.Annotations == nil {
cluster.Metadata.Annotations = make(map[string]string)
}
cluster.Metadata.Annotations["relays"] = string(relaysBytes)
cluster.Metadata.Annotations["paralus.dev/relays"] = string(relaysBytes)

return nil
}
Expand Down

0 comments on commit 749dcb4

Please sign in to comment.