Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add status field for the function CRD #1104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion artifacts/crds/openfaas.com_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ spec:
type: array
items:
type: string
status:
description: FunctionStatus defines the observed state of a Function
type: object
served: true
storage: true
subresources: {}
subresources:
status: {}
status:
acceptedNames:
kind: ""
Expand Down
8 changes: 8 additions & 0 deletions pkg/apis/openfaas/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ import (
// +genclient:noStatus
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.spec.image`
// +kubebuilder:subresource:status

// Function describes an OpenFaaS function
type Function struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec FunctionSpec `json:"spec"`

// +optional
Status FunctionStatus `json:"status"`
}

// FunctionSpec is the spec for a Function resource
Expand Down Expand Up @@ -43,6 +47,10 @@ type FunctionSpec struct {
ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem"`
}

// FunctionStatus defines the observed state of a Function
type FunctionStatus struct {
}

// FunctionResources is used to set CPU and memory limits and requests
type FunctionResources struct {
Memory string `json:"memory,omitempty"`
Expand Down
17 changes: 17 additions & 0 deletions pkg/apis/openfaas/v1/zz_generated.deepcopy.go

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

5 changes: 4 additions & 1 deletion pkg/client/clientset/versioned/fake/clientset_generated.go

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

14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/fake/register.go

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

14 changes: 7 additions & 7 deletions pkg/client/clientset/versioned/scheme/register.go

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