Skip to content

Commit

Permalink
Add All-port Service config for all resources (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
Starttoaster authored Aug 30, 2024
1 parent 5525dee commit 28fc541
Show file tree
Hide file tree
Showing 28 changed files with 1,003 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ jobs:
fi
echo "Expected 1 endpoint, found $service_endpoints_number"
- name: Check to make sure ChiaNode all-port Service has one endpoint
run: |
service_endpoints_number=$(kubectl get endpoints chianode-test-node-all -o json | jq '.subsets[].addresses | length')
if [ "$service_endpoints_number" -ne 1 ]; then
echo "ChiaNode all-port Service was found to have $service_endpoints_number endpoints, expected 1"
exit 1
fi
echo "Expected 1 endpoint, found $service_endpoints_number"
- name: Check to make sure ChiaNode RPC Service has one endpoint
run: |
service_endpoints_number=$(kubectl get endpoints chianode-test-node-rpc -o json | jq '.subsets[].addresses | length')
Expand Down
5 changes: 5 additions & 0 deletions api/v1/chiacommon_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ type CommonSpecChia struct {
// +optional
RPCService Service `json:"rpcService,omitempty"`

// AllService defines settings for a Service that contains all the ports from the peer, daemon, and RPC Services installed with any Chia component resource.
// This Service will default to being enabled with a ClusterIP Service type.
// +optional
AllService Service `json:"allService,omitempty"`

// Periodic probe of container liveness.
// +optional
LivenessProbe *corev1.Probe `json:"livenessProbe,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions api/v1/zz_generated.deepcopy.go

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

45 changes: 45 additions & 0 deletions config/crd/bases/k8s.chia.net_chiacrawlers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,51 @@ spec:
description: ChiaConfig defines the configuration options available
to Chia component containers
properties:
allService:
description: |-
AllService defines settings for a Service that contains all the ports from the peer, daemon, and RPC Services installed with any Chia component resource.
This Service will default to being enabled with a ClusterIP Service type.
properties:
annotations:
additionalProperties:
type: string
description: Annotations is a map of string keys and values
to attach to created objects
type: object
enabled:
description: Enabled is a boolean selector for a Service if
it should be generated.
type: boolean
ipFamilies:
description: IPFamilies represents a list of IP families (IPv4
and/or IPv6) required by a Service
items:
description: |-
IPFamily represents the IP Family (IPv4 or IPv6). This type is used
to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies).
type: string
type: array
ipFamilyPolicy:
description: IPFamilyPolicy represents the dual-stack-ness
requested or required by a Service
type: string
labels:
additionalProperties:
type: string
description: Labels is a map of string keys and values to
attach to created objects
type: object
rollIntoPeerService:
description: |-
RollIntoPeerService tells the controller to not actually generate this Service, but instead roll the Service ports of this Service into the peer Service.
The peer Service is often considered the primary Service generated for a chia resource, as it is the most likely Service to expose publicly.
This option is default, and only provides its functionality on chia-healthcheck Services. It may be included to other Services someday if a use case arises.
type: boolean
type:
description: ServiceType is the Type of the Service. Defaults
to ClusterIP
type: string
type: object
caSecretName:
description: CASecretName is the name of the secret that contains
the CA crt and key. Not required for seeders.
Expand Down
45 changes: 45 additions & 0 deletions config/crd/bases/k8s.chia.net_chiafarmers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,51 @@ spec:
description: ChiaConfig defines the configuration options available
to Chia component containers
properties:
allService:
description: |-
AllService defines settings for a Service that contains all the ports from the peer, daemon, and RPC Services installed with any Chia component resource.
This Service will default to being enabled with a ClusterIP Service type.
properties:
annotations:
additionalProperties:
type: string
description: Annotations is a map of string keys and values
to attach to created objects
type: object
enabled:
description: Enabled is a boolean selector for a Service if
it should be generated.
type: boolean
ipFamilies:
description: IPFamilies represents a list of IP families (IPv4
and/or IPv6) required by a Service
items:
description: |-
IPFamily represents the IP Family (IPv4 or IPv6). This type is used
to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies).
type: string
type: array
ipFamilyPolicy:
description: IPFamilyPolicy represents the dual-stack-ness
requested or required by a Service
type: string
labels:
additionalProperties:
type: string
description: Labels is a map of string keys and values to
attach to created objects
type: object
rollIntoPeerService:
description: |-
RollIntoPeerService tells the controller to not actually generate this Service, but instead roll the Service ports of this Service into the peer Service.
The peer Service is often considered the primary Service generated for a chia resource, as it is the most likely Service to expose publicly.
This option is default, and only provides its functionality on chia-healthcheck Services. It may be included to other Services someday if a use case arises.
type: boolean
type:
description: ServiceType is the Type of the Service. Defaults
to ClusterIP
type: string
type: object
caSecretName:
description: CASecretName is the name of the secret that contains
the CA crt and key. Not required for seeders.
Expand Down
45 changes: 45 additions & 0 deletions config/crd/bases/k8s.chia.net_chiaharvesters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,51 @@ spec:
description: ChiaConfig defines the configuration options available
to Chia component containers
properties:
allService:
description: |-
AllService defines settings for a Service that contains all the ports from the peer, daemon, and RPC Services installed with any Chia component resource.
This Service will default to being enabled with a ClusterIP Service type.
properties:
annotations:
additionalProperties:
type: string
description: Annotations is a map of string keys and values
to attach to created objects
type: object
enabled:
description: Enabled is a boolean selector for a Service if
it should be generated.
type: boolean
ipFamilies:
description: IPFamilies represents a list of IP families (IPv4
and/or IPv6) required by a Service
items:
description: |-
IPFamily represents the IP Family (IPv4 or IPv6). This type is used
to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies).
type: string
type: array
ipFamilyPolicy:
description: IPFamilyPolicy represents the dual-stack-ness
requested or required by a Service
type: string
labels:
additionalProperties:
type: string
description: Labels is a map of string keys and values to
attach to created objects
type: object
rollIntoPeerService:
description: |-
RollIntoPeerService tells the controller to not actually generate this Service, but instead roll the Service ports of this Service into the peer Service.
The peer Service is often considered the primary Service generated for a chia resource, as it is the most likely Service to expose publicly.
This option is default, and only provides its functionality on chia-healthcheck Services. It may be included to other Services someday if a use case arises.
type: boolean
type:
description: ServiceType is the Type of the Service. Defaults
to ClusterIP
type: string
type: object
caSecretName:
description: CASecretName is the name of the secret that contains
the CA crt and key. Not required for seeders.
Expand Down
45 changes: 45 additions & 0 deletions config/crd/bases/k8s.chia.net_chiaintroducers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,51 @@ spec:
description: ChiaConfig defines the configuration options available
to Chia component containers
properties:
allService:
description: |-
AllService defines settings for a Service that contains all the ports from the peer, daemon, and RPC Services installed with any Chia component resource.
This Service will default to being enabled with a ClusterIP Service type.
properties:
annotations:
additionalProperties:
type: string
description: Annotations is a map of string keys and values
to attach to created objects
type: object
enabled:
description: Enabled is a boolean selector for a Service if
it should be generated.
type: boolean
ipFamilies:
description: IPFamilies represents a list of IP families (IPv4
and/or IPv6) required by a Service
items:
description: |-
IPFamily represents the IP Family (IPv4 or IPv6). This type is used
to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies).
type: string
type: array
ipFamilyPolicy:
description: IPFamilyPolicy represents the dual-stack-ness
requested or required by a Service
type: string
labels:
additionalProperties:
type: string
description: Labels is a map of string keys and values to
attach to created objects
type: object
rollIntoPeerService:
description: |-
RollIntoPeerService tells the controller to not actually generate this Service, but instead roll the Service ports of this Service into the peer Service.
The peer Service is often considered the primary Service generated for a chia resource, as it is the most likely Service to expose publicly.
This option is default, and only provides its functionality on chia-healthcheck Services. It may be included to other Services someday if a use case arises.
type: boolean
type:
description: ServiceType is the Type of the Service. Defaults
to ClusterIP
type: string
type: object
caSecretName:
description: CASecretName is the name of the secret that contains
the CA crt and key. Not required for introducers.
Expand Down
45 changes: 45 additions & 0 deletions config/crd/bases/k8s.chia.net_chianodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,51 @@ spec:
description: ChiaConfig defines the configuration options available
to Chia component containers
properties:
allService:
description: |-
AllService defines settings for a Service that contains all the ports from the peer, daemon, and RPC Services installed with any Chia component resource.
This Service will default to being enabled with a ClusterIP Service type.
properties:
annotations:
additionalProperties:
type: string
description: Annotations is a map of string keys and values
to attach to created objects
type: object
enabled:
description: Enabled is a boolean selector for a Service if
it should be generated.
type: boolean
ipFamilies:
description: IPFamilies represents a list of IP families (IPv4
and/or IPv6) required by a Service
items:
description: |-
IPFamily represents the IP Family (IPv4 or IPv6). This type is used
to express the family of an IP expressed by a type (e.g. service.spec.ipFamilies).
type: string
type: array
ipFamilyPolicy:
description: IPFamilyPolicy represents the dual-stack-ness
requested or required by a Service
type: string
labels:
additionalProperties:
type: string
description: Labels is a map of string keys and values to
attach to created objects
type: object
rollIntoPeerService:
description: |-
RollIntoPeerService tells the controller to not actually generate this Service, but instead roll the Service ports of this Service into the peer Service.
The peer Service is often considered the primary Service generated for a chia resource, as it is the most likely Service to expose publicly.
This option is default, and only provides its functionality on chia-healthcheck Services. It may be included to other Services someday if a use case arises.
type: boolean
type:
description: ServiceType is the Type of the Service. Defaults
to ClusterIP
type: string
type: object
caSecretName:
description: CASecretName is the name of the secret that contains
the CA crt and key. Not required for seeders.
Expand Down
Loading

0 comments on commit 28fc541

Please sign in to comment.