Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Commit

Permalink
crd naming optimization (#117)
Browse files Browse the repository at this point in the history
Signed-off-by: HIHIA <[email protected]>

Signed-off-by: HIHIA <[email protected]>
  • Loading branch information
YTGhost authored Sep 19, 2022
1 parent b22ba35 commit dfea469
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@ spec:
spec:
description: YurtIngressSpec defines the desired state of YurtIngress
properties:
ingress_controller_image:
ingressControllerImage:
description: Indicates the ingress controller image url.
type: string
ingress_controller_replicas_per_pool:
ingressControllerReplicasPerPool:
description: Indicates the number of the ingress controllers to be
deployed under all the specified nodepools.
format: int32
type: integer
ingress_webhook_certgen_image:
ingressWebhookCertGenImage:
description: Indicates the ingress webhook image url.
type: string
pools:
description: Indicates all the nodepools on which to enable ingress.
items:
description: IngressPool defines the details of a Pool for ingress
properties:
ingress_ips:
ingressIPs:
description: IngressIPs is a list of IP addresses for which
nodes will also accept traffic for this service.
items:
Expand All @@ -92,26 +92,7 @@ spec:
conditions:
description: Indicates all the nodepools on which to enable ingress.
properties:
ingressreadypools:
description: Indicates the pools that ingress controller is deployed
successfully.
items:
description: IngressPool defines the details of a Pool for ingress
properties:
ingress_ips:
description: IngressIPs is a list of IP addresses for which
nodes will also accept traffic for this service.
items:
type: string
type: array
name:
description: Indicates the pool name.
type: string
required:
- name
type: object
type: array
ingressunreadypools:
ingressNotReadyPools:
description: Indicates the pools that ingress controller is being
deployed or deployed failed.
items:
Expand All @@ -121,7 +102,7 @@ spec:
pool:
description: Indicates the base pool info.
properties:
ingress_ips:
ingressIPs:
description: IngressIPs is a list of IP addresses for
which nodes will also accept traffic for this service.
items:
Expand All @@ -133,7 +114,7 @@ spec:
required:
- name
type: object
unreadyinfo:
unreadyInfo:
description: Info of ingress not ready condition.
properties:
lastTransitionTime:
Expand All @@ -156,16 +137,35 @@ spec:
- pool
type: object
type: array
ingressReadyPools:
description: Indicates the pools that ingress controller is deployed
successfully.
items:
description: IngressPool defines the details of a Pool for ingress
properties:
ingressIPs:
description: IngressIPs is a list of IP addresses for which
nodes will also accept traffic for this service.
items:
type: string
type: array
name:
description: Indicates the pool name.
type: string
required:
- name
type: object
type: array
type: object
ingress_controller_image:
ingressControllerImage:
description: Indicates the ingress controller image url.
type: string
ingress_controller_replicas_per_pool:
ingressControllerReplicasPerPool:
description: Indicates the number of the ingress controllers deployed
under all the specified nodepools.
format: int32
type: integer
ingress_webhook_certgen_image:
ingressWebhookCertGenImage:
description: Indicates the ingress webhook image url.
type: string
readyNum:
Expand Down
50 changes: 25 additions & 25 deletions config/yurt-app-manager/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /mutate-apps-openyurt-io-v1alpha1-yurtappdaemon
path: /mutate-apps-openyurt-io-v1alpha1-uniteddeployment
failurePolicy: Fail
name: myurtappdaemon.kb.io
name: muniteddeployment.kb.io
rules:
- apiGroups:
- apps.openyurt.io
Expand All @@ -44,17 +44,17 @@ webhooks:
- CREATE
- UPDATE
resources:
- yurtappdaemons
- uniteddeployments
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /mutate-apps-openyurt-io-v1alpha1-yurtappset
path: /mutate-apps-openyurt-io-v1alpha1-yurtappdaemon
failurePolicy: Fail
name: myurtappset.kb.io
name: myurtappdaemon.kb.io
rules:
- apiGroups:
- apps.openyurt.io
Expand All @@ -64,17 +64,17 @@ webhooks:
- CREATE
- UPDATE
resources:
- yurtappsets
- yurtappdaemons
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /mutate-apps-openyurt-io-v1alpha1-yurtingress
path: /mutate-apps-openyurt-io-v1alpha1-yurtappset
failurePolicy: Fail
name: myurtingress.kb.io
name: myurtappset.kb.io
rules:
- apiGroups:
- apps.openyurt.io
Expand All @@ -84,17 +84,17 @@ webhooks:
- CREATE
- UPDATE
resources:
- yurtingresses
- yurtappsets
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /mutate-apps-openyurt-io-v1alpha1-uniteddeployment
path: /mutate-apps-openyurt-io-v1alpha1-yurtingress
failurePolicy: Fail
name: muniteddeployment.kb.io
name: myurtingress.kb.io
rules:
- apiGroups:
- apps.openyurt.io
Expand All @@ -104,7 +104,7 @@ webhooks:
- CREATE
- UPDATE
resources:
- uniteddeployments
- yurtingresses
sideEffects: None

---
Expand Down Expand Up @@ -141,9 +141,9 @@ webhooks:
service:
name: webhook-service
namespace: system
path: /validate-apps-openyurt-io-v1alpha1-yurtappdaemon
path: /validate-apps-openyurt-io-v1alpha1-uniteddeployment
failurePolicy: Fail
name: vyurtappdaemon.kb.io
name: vuniteddeployment.kb.io
rules:
- apiGroups:
- apps.openyurt.io
Expand All @@ -153,17 +153,17 @@ webhooks:
- CREATE
- UPDATE
resources:
- yurtappdaemons
- uniteddeployments
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-apps-openyurt-io-v1alpha1-yurtappset
path: /validate-apps-openyurt-io-v1alpha1-yurtappdaemon
failurePolicy: Fail
name: vyurtappset.kb.io
name: vyurtappdaemon.kb.io
rules:
- apiGroups:
- apps.openyurt.io
Expand All @@ -173,17 +173,17 @@ webhooks:
- CREATE
- UPDATE
resources:
- yurtappsets
- yurtappdaemons
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-apps-openyurt-io-v1alpha1-yurtingress
path: /validate-apps-openyurt-io-v1alpha1-yurtappset
failurePolicy: Fail
name: vyurtingress.kb.io
name: vyurtappset.kb.io
rules:
- apiGroups:
- apps.openyurt.io
Expand All @@ -192,19 +192,18 @@ webhooks:
operations:
- CREATE
- UPDATE
- DELETE
resources:
- yurtingresses
- yurtappsets
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-apps-openyurt-io-v1alpha1-uniteddeployment
path: /validate-apps-openyurt-io-v1alpha1-yurtingress
failurePolicy: Fail
name: vuniteddeployment.kb.io
name: vyurtingress.kb.io
rules:
- apiGroups:
- apps.openyurt.io
Expand All @@ -213,6 +212,7 @@ webhooks:
operations:
- CREATE
- UPDATE
- DELETE
resources:
- uniteddeployments
- yurtingresses
sideEffects: None
20 changes: 10 additions & 10 deletions pkg/yurtappmanager/apis/apps/v1alpha1/yurtingress_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type IngressPool struct {
Name string `json:"name"`

// IngressIPs is a list of IP addresses for which nodes will also accept traffic for this service.
IngressIPs []string `json:"ingress_ips,omitempty"`
IngressIPs []string `json:"ingressIPs,omitempty"`
}

// IngressNotReadyConditionInfo defines the details info of an ingress not ready Pool
Expand All @@ -60,22 +60,22 @@ type IngressNotReadyPool struct {
Pool IngressPool `json:"pool"`

// Info of ingress not ready condition.
Info *IngressNotReadyConditionInfo `json:"unreadyinfo,omitempty"`
Info *IngressNotReadyConditionInfo `json:"unreadyInfo,omitempty"`
}

// YurtIngressSpec defines the desired state of YurtIngress
type YurtIngressSpec struct {
// Indicates the number of the ingress controllers to be deployed under all the specified nodepools.
// +optional
Replicas int32 `json:"ingress_controller_replicas_per_pool,omitempty"`
Replicas int32 `json:"ingressControllerReplicasPerPool,omitempty"`

// Indicates the ingress controller image url.
// +optional
IngressControllerImage string `json:"ingress_controller_image,omitempty"`
IngressControllerImage string `json:"ingressControllerImage,omitempty"`

// Indicates the ingress webhook image url.
// +optional
IngressWebhookCertGenImage string `json:"ingress_webhook_certgen_image,omitempty"`
IngressWebhookCertGenImage string `json:"ingressWebhookCertGenImage,omitempty"`

// Indicates all the nodepools on which to enable ingress.
// +optional
Expand All @@ -85,29 +85,29 @@ type YurtIngressSpec struct {
// YurtIngressCondition describes current state of a YurtIngress
type YurtIngressCondition struct {
// Indicates the pools that ingress controller is deployed successfully.
IngressReadyPools []IngressPool `json:"ingressreadypools,omitempty"`
IngressReadyPools []IngressPool `json:"ingressReadyPools,omitempty"`

// Indicates the pools that ingress controller is being deployed or deployed failed.
IngressNotReadyPools []IngressNotReadyPool `json:"ingressunreadypools,omitempty"`
IngressNotReadyPools []IngressNotReadyPool `json:"ingressNotReadyPools,omitempty"`
}

// YurtIngressStatus defines the observed state of YurtIngress
type YurtIngressStatus struct {
// Indicates the number of the ingress controllers deployed under all the specified nodepools.
// +optional
Replicas int32 `json:"ingress_controller_replicas_per_pool,omitempty"`
Replicas int32 `json:"ingressControllerReplicasPerPool,omitempty"`

// Indicates all the nodepools on which to enable ingress.
// +optional
Conditions YurtIngressCondition `json:"conditions,omitempty"`

// Indicates the ingress controller image url.
// +optional
IngressControllerImage string `json:"ingress_controller_image"`
IngressControllerImage string `json:"ingressControllerImage"`

// Indicates the ingress webhook image url.
// +optional
IngressWebhookCertGenImage string `json:"ingress_webhook_certgen_image"`
IngressWebhookCertGenImage string `json:"ingressWebhookCertGenImage"`

// Total number of ready pools on which ingress is enabled.
// +optional
Expand Down

0 comments on commit dfea469

Please sign in to comment.