Skip to content
Open
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
5 changes: 2 additions & 3 deletions details/operator-sdk/api/v1/astraconnector_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ type Astra struct {
// +kubebuilder:validation:Optional
ClusterName string `json:"clusterName,omitempty"`
// +kubebuilder:validation:Optional
SkipTLSValidation bool `json:"skipTLSValidation,omitempty"`
// +kubebuilder:validation:Required
TokenRef string `json:"tokenRef,omitempty"`
SkipTLSValidation bool `json:"skipTLSValidation,omitempty"`
TokenRef string `json:"tokenRef,omitempty"`
// +kubebuilder:validation:Optional
Unregister bool `json:"unregister,omitempty"`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ spec:
- accountId
- cloudId
- clusterId
- tokenRef
type: object
astraConnect:
properties:
Expand Down Expand Up @@ -189,7 +188,6 @@ spec:
- accountId
- cloudId
- clusterId
- tokenRef
type: object
astraConnect:
properties:
Expand Down
7 changes: 0 additions & 7 deletions details/operator-sdk/config/manager/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
apiVersion: v1
kind: Namespace
metadata:
labels:
control-plane: controller-manager
name: system
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"fmt"
"net/http"
"reflect"
"sigs.k8s.io/controller-runtime/pkg/builder"
"strings"
"time"

Expand Down Expand Up @@ -450,7 +451,7 @@ func getPodNames(pods []corev1.Pod) []string {
// SetupWithManager sets up the controller with the Manager.
func (r *AstraConnectorController) SetupWithManager(mgr ctrl.Manager) error {
return ctrl.NewControllerManagedBy(mgr).
For(&v1.AstraConnector{}).
For(&v1.AstraConnector{}, builder.WithPredicates(predicate.GenerationChangedPredicate{})).
Owns(&appsv1.Deployment{}).
Owns(&appsv1.StatefulSet{}).
Owns(&corev1.Service{}).
Expand Down
2 changes: 1 addition & 1 deletion details/operator-sdk/controllers/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (r *AstraConnectorController) deployResources(ctx context.Context, deployer
// todo we need to use event and not use status because that causes reconciles
log.Info(statusMsg)
//natsSyncClientStatus.Status = statusMsg
//_ = r.updateAstraConnectorStatus(ctx, astraConnector, *natsSyncClientStatus)
_ = r.updateAstraConnectorStatus(ctx, astraConnector, *natsSyncClientStatus)

result, err := k8sUtil.CreateOrUpdateResource(ctx, kubeObject, astraConnector, mutateFunc)
if err != nil {
Expand Down