Skip to content

Commit

Permalink
fix(root): fix bug NodePort turn to ClusterIP, change port is forbidden
Browse files Browse the repository at this point in the history
  • Loading branch information
xishengcai committed May 30, 2022
1 parent 2b8b3e2 commit 1545aef
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 27 deletions.
12 changes: 6 additions & 6 deletions apis/core/v1alpha2/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ spec:
type: array
required:
- components
- volumeClaims
type: object
status:
description: An ApplicationConfigurationStatus represents the observed state of a ApplicationConfiguration.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ spec:
description: Value that should be written to the configuration file.
type: string
required:
- path
- path
- value
type: object
type: array
env:
Expand Down Expand Up @@ -222,15 +223,21 @@ spec:
format: int32
type: integer
hostPort:
description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
format: int32
type: integer
name:
type: string
nodePort:
description: 'The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport'
format: int32
type: integer
protocol:
description: 'TODO(negz): Use +kubebuilder:default marker to default Protocol to TCP once we''re generating v1 CRDs. Protocol used by the server listening on this port.'
description: once we're generating v1 CRDs. Protocol used by the server listening on this port.
enum:
- TCP
- UDP
- TCP
- UDP
- SCTP
type: string
required:
- containerPort
Expand Down Expand Up @@ -329,7 +336,6 @@ spec:
description: CPU required by this container.
properties:
limits:
description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: string
required:
description: Required CPU count. 1.0 represents one CPU core.
Expand Down Expand Up @@ -359,13 +365,10 @@ spec:
gpu:
description: GPU required by this container.
properties:
limits:
type: string
required:
description: Required GPU count.
type: string
required:
- limits
- required
type: object
memory:
Expand All @@ -377,7 +380,6 @@ spec:
description: Required memory.
type: string
required:
- limits
- required
type: object
volumes:
Expand Down Expand Up @@ -438,6 +440,7 @@ spec:
enum:
- HelmRelease
- ContainerizedWorkload
- Third
type: string
name:
description: Name of the referenced object.
Expand All @@ -447,8 +450,11 @@ spec:
- name
type: object
type: array
forceUpdateTimestamp:
description: ForceUpdateTimestamp
type: string
initContainers:
description: An ApplicationConfigurationSpec defines the desired state of a
description: InitContainers of which this workload initContainers.
items:
description: A Container represents an Open Containers Initiative (OCI) container.
properties:
Expand Down Expand Up @@ -491,6 +497,7 @@ spec:
type: string
required:
- path
- value
type: object
type: array
env:
Expand Down Expand Up @@ -626,15 +633,21 @@ spec:
format: int32
type: integer
hostPort:
description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this.
format: int32
type: integer
name:
type: string
nodePort:
description: 'The port on each node on which this service is exposed when type=NodePort or LoadBalancer. Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport'
format: int32
type: integer
protocol:
description: 'TODO(negz): Use +kubebuilder:default marker to default Protocol to TCP once we''re generating v1 CRDs. Protocol used by the server listening on this port.'
description: once we're generating v1 CRDs. Protocol used by the server listening on this port.
enum:
- TCP
- UDP
- SCTP
type: string
required:
- containerPort
Expand Down Expand Up @@ -733,7 +746,6 @@ spec:
description: CPU required by this container.
properties:
limits:
description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
type: string
required:
description: Required CPU count. 1.0 represents one CPU core.
Expand Down Expand Up @@ -763,13 +775,10 @@ spec:
gpu:
description: GPU required by this container.
properties:
limits:
type: string
required:
description: Required GPU count.
type: string
required:
- limits
- required
type: object
memory:
Expand All @@ -781,7 +790,6 @@ spec:
description: Required memory.
type: string
required:
- limits
- required
type: object
volumes:
Expand Down Expand Up @@ -841,15 +849,21 @@ spec:
osType:
description: OperatingSystem required by this workload.
enum:
- linux
- windows
- linux
- windows
type: string
pointToGrayName:
description: old grey workload name need modify match selector
type: string
serviceMesh:
description: check is install istio
description: check add istio label
type: boolean
serviceType:
description: 'ServiceType determines how the Service is exposed. Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. "ExternalName" maps to the specified externalName. "ClusterIP" allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object. If clusterIP is "None", no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a stable IP. "NodePort" builds on ClusterIP and allocates a port on every node which routes to the clusterIP. "LoadBalancer" builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the clusterIP. More info: https://kubernetes.io/docs/concepts/services-networking/service/'
type: string
type:
description: Type support deployment and statefulSet
type: string
required:
- containers
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ spec:
properties:
containerIndex:
type: integer
isInitContainer:
type: boolean
paths:
items:
properties:
Expand All @@ -65,7 +67,8 @@ spec:
type: object
type: array
required:
- containerIndex
- containerIndex
- isInitContainer
- paths
type: object
type: array
Expand Down

0 comments on commit 1545aef

Please sign in to comment.