Skip to content

Commit

Permalink
config: add project config api
Browse files Browse the repository at this point in the history
  • Loading branch information
mfojtik committed Jan 16, 2019
1 parent 5b54c05 commit 7259236
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 4 deletions.
16 changes: 13 additions & 3 deletions config/v1/types_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// Project holds cluster-wide information about Project. The canonical name is `cluster`
// TODO this object is an example of a possible grouping and is subject to change or removal
type Project struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
Expand All @@ -19,9 +18,20 @@ type Project struct {
Status ProjectStatus `json:"status"`
}

// TemplateReference references a project request template in a 'openshift-config' namespace.
type TemplateReference struct {
// name is the metadata.name of the referenced project request template
Name string `json:"name"`
}

type ProjectSpec struct {
// project request message
// project request template
// projectRequestMessage is the string presented to a user if they are unable to request a project via the projectrequest api endpoint
ProjectRequestMessage string `json:"projectRequestMessage"`

// projectRequestTemplate is the template to use for creating projects in response to projectrequest.
// This must point to a template in 'openshift-config' namespace. It is optional.
// If it is not specified, a default template is used.
ProjectRequestTemplate *TemplateReference `json:"projectRequestTemplate"`
}

type ProjectStatus struct {
Expand Down
27 changes: 26 additions & 1 deletion config/v1/zz_generated.deepcopy.go

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

18 changes: 18 additions & 0 deletions config/v1/zz_generated.swagger_doc_generated.go

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

0 comments on commit 7259236

Please sign in to comment.