Skip to content

Commit

Permalink
remove workload controller
Browse files Browse the repository at this point in the history
  • Loading branch information
kvaps committed Jan 7, 2025
1 parent fc3bea1 commit 13812cf
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 321 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ type WorkloadMonitorSpec struct {
// +required
Selector map[string]string `json:"selector"`

// Kind specifies the kind of the workload
// +optional
Kind string `json:"kind,omitempty"`

// Type specifies the type of the workload
// +optional
Type string `json:"type,omitempty"`
Expand Down Expand Up @@ -47,7 +51,10 @@ type WorkloadMonitorStatus struct {

// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="Kind",type="string",JSONPath=".spec.kind"
// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".spec.type"
// +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version"
// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".spec.replicas"
// +kubebuilder:printcolumn:name="MinReplicas",type="integer",JSONPath=".spec.minReplicas"
// +kubebuilder:printcolumn:name="Available",type="integer",JSONPath=".status.availableReplicas"
// +kubebuilder:printcolumn:name="Observed",type="integer",JSONPath=".status.observedReplicas"
Expand Down
8 changes: 0 additions & 8 deletions packages/system/cozystack-workload-controller/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,6 @@ func main() {
os.Exit(1)
}

if err = (&controller.WorkloadReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "Workload")
os.Exit(1)
}

if err = (&controller.WorkloadMonitorReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,18 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.kind
name: Kind
type: string
- jsonPath: .spec.type
name: Type
type: string
- jsonPath: .spec.version
name: Version
type: string
- jsonPath: .spec.replicas
name: Replicas
type: integer
- jsonPath: .spec.minReplicas
name: MinReplicas
type: integer
Expand Down Expand Up @@ -55,6 +64,9 @@ spec:
spec:
description: WorkloadMonitorSpec defines the desired state of WorkloadMonitor
properties:
kind:
description: Kind specifies the kind of the workload
type: string
minReplicas:
description: MinReplicas specifies the minimum number of replicas
that should be available
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- cozystack.io
resources:
- workloadmonitors/finalizers
verbs:
- update
- apiGroups:
- cozystack.io
resources:
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 13812cf

Please sign in to comment.