Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
feat: support scaling NamespacedIngress resource (#104)
Browse files Browse the repository at this point in the history
* feat: support scale NamespacedIngress

Signed-off-by: Lin Yang <reaver@flomesh.io>

* chore: regenerate CRD yaml

Signed-off-by: Lin Yang <reaver@flomesh.io>

Signed-off-by: Lin Yang <reaver@flomesh.io>
  • Loading branch information
reaver-flomesh authored Nov 11, 2022
1 parent 4528259 commit 7f803e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apis/namespacedingress/v1alpha1/namespacedingress_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,16 @@ type SSLPassthrough struct {

// NamespacedIngressStatus defines the observed state of NamespacedIngress
type NamespacedIngressStatus struct {
Replicas int32 `json:"replicas"`
Selector string `json:"selector"`
}

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +k8s:openapi-gen=true
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.selector
// +kubebuilder:resource:shortName=nsig,scope=Namespaced
// +kubebuilder:printcolumn:name="Age",type="date",priority=0,JSONPath=".metadata.creationTimestamp"

Expand Down
13 changes: 13 additions & 0 deletions charts/fsm/apis/flomesh.io_namespacedingresses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1261,9 +1261,22 @@ spec:
type: object
status:
description: NamespacedIngressStatus defines the observed state of NamespacedIngress
properties:
replicas:
format: int32
type: integer
selector:
type: string
required:
- replicas
- selector
type: object
type: object
served: true
storage: true
subresources:
scale:
labelSelectorPath: .status.selector
specReplicasPath: .spec.replicas
statusReplicasPath: .status.replicas
status: {}

0 comments on commit 7f803e4

Please sign in to comment.