Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Ortel <[email protected]>
  • Loading branch information
jortel committed Jun 15, 2024
1 parent dbf7060 commit 6bf085f
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 1,420 deletions.
18 changes: 2 additions & 16 deletions generated/crd/tackle.konveyor.io_addons.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@ spec:
singular: addon
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=='Ready')].status
name: READY
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha1
- name: v1alpha1
schema:
openAPIV3Schema:
properties:
Expand Down Expand Up @@ -94,14 +87,7 @@ spec:
storage: false
subresources:
status: {}
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=='Ready')].status
name: READY
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1alpha2
- name: v1alpha2
schema:
openAPIV3Schema:
properties:
Expand Down
1,241 changes: 2 additions & 1,239 deletions generated/crd/tackle.konveyor.io_extensions.yaml

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions generated/crd/tackle.konveyor.io_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,6 @@ spec:
type: string
metadata:
type: object
spec:
description: TaskSpec defines the desired state of Task
properties:
data:
description: Data object passed to the addon..
type: object
x-kubernetes-preserve-unknown-fields: true
dependencies:
description: Dependencies
items:
type: string
type: array
priority:
description: Priority
type: integer
type: object
status:
description: TaskStatus defines the observed state of Task
properties:
observedGeneration:
description: The most recent generation observed by the controller.
format: int64
type: integer
type: object
type: object
served: false
storage: false
Expand Down
2 changes: 0 additions & 2 deletions k8s/api/tackle/v1alpha1/addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ type AddonStatus struct {
// +k8s:openapi-gen=true
// +kubebuilder:unservedversion
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
type Addon struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Expand Down
25 changes: 0 additions & 25 deletions k8s/api/tackle/v1alpha1/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,17 @@ limitations under the License.
package v1alpha1

import (
core "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)

// ExtensionSpec defines the desired state of Extension
type ExtensionSpec struct {
// Addon compatibility.
Addon string `json:"addon"`
// Container details.
Container core.Container `json:"container"`
// Selector
Selector string `json:"selector,omitempty"`
// Metadata details.
Metadata runtime.RawExtension `json:"metadata,omitempty"`
}

// ExtensionStatus defines the observed state of Extension
type ExtensionStatus struct {
// The most recent generation observed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:openapi-gen=true
// +kubebuilder:unservedversion
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
type Extension struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec ExtensionSpec `json:"spec,omitempty"`
Status ExtensionStatus `json:"status,omitempty"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
6 changes: 3 additions & 3 deletions k8s/api/tackle/v1alpha1/tackle.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ package v1alpha1

import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:openapi-gen=true
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="CONNECTED",type=string,JSONPath=".status.conditions[?(@.type=='ConnectionTestSucceeded')].status"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
type Tackle struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec runtime.RawExtension `json:"spec"`
Status runtime.RawExtension `json:"status"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
32 changes: 0 additions & 32 deletions k8s/api/tackle/v1alpha1/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,8 @@ package v1alpha1

import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)

// TaskSpec defines the desired state of Task
type TaskSpec struct {
// Priority
Priority int `json:"priority,omitempty"`
// Dependencies
Dependencies []string `json:"dependencies,omitempty"`
// Data object passed to the addon..
Data runtime.RawExtension `json:"data,omitempty"`
}

// TaskStatus defines the observed state of Task
type TaskStatus struct {
// The most recent generation observed by the controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:openapi-gen=true
Expand All @@ -46,20 +28,6 @@ type TaskStatus struct {
type Task struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec TaskSpec `json:"spec,omitempty"`
Status TaskStatus `json:"status,omitempty"`
}

// HasDep return true if the task has the dependency.
func (r *Task) HasDep(name string) (found bool) {
for i := range r.Spec.Dependencies {
n := r.Spec.Dependencies[i]
if n == name {
found = true
break
}
}
return
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
74 changes: 2 additions & 72 deletions k8s/api/tackle/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions k8s/api/tackle/v1alpha2/addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ type AddonStatus struct {
// +k8s:openapi-gen=true
// +kubebuilder:storageversion
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
type Addon struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Expand Down
2 changes: 0 additions & 2 deletions k8s/api/tackle/v1alpha2/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ type ExtensionStatus struct {
// +k8s:openapi-gen=true
// +kubebuilder:storageversion
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
type Extension struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Expand Down
6 changes: 3 additions & 3 deletions k8s/api/tackle/v1alpha2/tackle.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ package v1alpha2

import (
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:openapi-gen=true
// +kubebuilder:storageversion
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=".status.conditions[?(@.type=='Ready')].status"
// +kubebuilder:printcolumn:name="CONNECTED",type=string,JSONPath=".status.conditions[?(@.type=='ConnectionTestSucceeded')].status"
// +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
type Tackle struct {
meta.TypeMeta `json:",inline"`
meta.ObjectMeta `json:"metadata,omitempty"`
Spec runtime.RawExtension `json:"spec"`
Status runtime.RawExtension `json:"status"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down
2 changes: 2 additions & 0 deletions k8s/api/tackle/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6bf085f

Please sign in to comment.