-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tamal Saha <[email protected]>
- Loading branch information
Showing
17 changed files
with
730 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* | ||
Copyright AppsCode Inc. and Contributors | ||
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 | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
) | ||
|
||
const ( | ||
ResourceKindProject = "Project" | ||
ResourceProject = "project" | ||
ResourceProjects = "projects" | ||
) | ||
|
||
// ProjectSpec defines the desired state of Project | ||
type ProjectSpec struct { | ||
// +kubebuilder:default=User | ||
Type ProjectType `json:"type,omitempty"` | ||
Namespaces []string `json:"namespaces,omitempty"` | ||
NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` | ||
} | ||
|
||
// +kubebuilder:validation:Enum=Default;System;User | ||
type ProjectType string | ||
|
||
const ( | ||
ProjectDefault ProjectType = "Default" | ||
ProjectSystem ProjectType = "System" | ||
ProjectUser ProjectType = "User" | ||
) | ||
|
||
// ProjectStatus defines the observed state of Project | ||
type ProjectStatus struct{} | ||
|
||
// +genclient | ||
// +genclient:nonNamespaced | ||
// +genclient:onlyVerbs=get,list | ||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
//+kubebuilder:object:root=true | ||
//+kubebuilder:resource:scope=Cluster | ||
|
||
// Project is the Schema for the projects API | ||
type Project struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ObjectMeta `json:"metadata,omitempty"` | ||
|
||
Spec ProjectSpec `json:"spec,omitempty"` | ||
Status ProjectStatus `json:"status,omitempty"` | ||
} | ||
|
||
//+kubebuilder:object:root=true | ||
//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object | ||
|
||
// ProjectList contains a list of Project | ||
type ProjectList struct { | ||
metav1.TypeMeta `json:",inline"` | ||
metav1.ListMeta `json:"metadata,omitempty"` | ||
Items []Project `json:"items"` | ||
} | ||
|
||
func init() { | ||
SchemeBuilder.Register(&Project{}, &ProjectList{}) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
client/clientset/versioned/typed/core/v1alpha1/core_client.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.