-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Signed-off-by: Jeff Ortel <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
Copyright 2019 Red Hat Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha2 | ||
|
||
import ( | ||
core "k8s.io/api/core/v1" | ||
meta "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// AddonSpec defines the desired state of Addon | ||
type AddonSpec struct { | ||
// Main container. | ||
Main core.Container `json:"main"` | ||
// Init containers. | ||
Init []core.Container `json:"init,omitempty"` | ||
// Support containers. | ||
Support []core.Container `json:"support,omitempty"` | ||
} | ||
|
||
// AddonStatus defines the observed state of Addon | ||
type AddonStatus struct { | ||
// The most recent generation observed by the controller. | ||
// +optional | ||
ObservedGeneration int64 `json:"observedGeneration,omitempty"` | ||
} | ||
|
||
// Addon CR | ||
// +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="AGE",type="date",JSONPath=".metadata.creationTimestamp" | ||
type Addon struct { | ||
meta.TypeMeta `json:",inline"` | ||
meta.ObjectMeta `json:"metadata,omitempty"` | ||
Spec AddonSpec `json:"spec,omitempty"` | ||
Status AddonStatus `json:"status,omitempty"` | ||
} | ||
|
||
// AddonList CR | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
type AddonList struct { | ||
meta.TypeMeta `json:",inline"` | ||
meta.ListMeta `json:"metadata,omitempty"` | ||
Items []Addon `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&Addon{}, &AddonList{}) | ||
Check failure on line 64 in k8s/api/tackle/v1alpha2/addon.go
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Copyright 2019 Red Hat Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
// Package v1alpha1 contains API Schema definitions for the migration v1alpha1 API group. | ||
// +k8s:openapi-gen=true | ||
// +k8s:deepcopy-gen=package,register | ||
// +k8s:conversion-gen=github.com/konveyor/tackle2-controller/pkg/apis/migration | ||
// +k8s:defaulter-gen=TypeMeta | ||
// +groupName=tackle.konveyor.io | ||
package v1alpha2 | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/runtime/schema" | ||
"sigs.k8s.io/controller-runtime/pkg/scheme" | ||
) | ||
|
||
var SchemeGroupVersion = schema.GroupVersion{ | ||
Group: "tackle.konveyor.io", | ||
Version: "v1alpha2", | ||
} | ||
|
||
var SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
Copyright 2019 Red Hat Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package v1alpha2 | ||
|
||
import ( | ||
meta "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
// Tackle CR | ||
// +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"` | ||
} | ||
|
||
// TackleList CR | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
type TackleList struct { | ||
meta.TypeMeta `json:",inline"` | ||
meta.ListMeta `json:"metadata,omitempty"` | ||
Items []Tackle `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&TackleList{}, &Tackle{}) | ||
Check failure on line 45 in k8s/api/tackle/v1alpha2/tackle.go
|
||
} |