Skip to content

Commit

Permalink
K8SPG-389: LoadBalancerSourceRanges (#532)
Browse files Browse the repository at this point in the history
* Add loadBalancerSourceRanges field.

* Add loadBalancerSourceRanges to crunchy spec.

* Pass loadbalancerSourceRange.

* Add tests.

* Format

* Fix tests.

* Update cr.yaml.

---------

Co-authored-by: Viacheslav Sarzhan <[email protected]>
  • Loading branch information
inelpandzic and hors authored Oct 16, 2023
1 parent 066eac6 commit 8cf7d6d
Show file tree
Hide file tree
Showing 17 changed files with 283 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13811,6 +13811,13 @@ spec:
service:
description: Specification of the service that exposes PgBouncer.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -14137,6 +14144,13 @@ spec:
description: Specification of the service that exposes the PostgreSQL
primary instance.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -15695,6 +15709,13 @@ spec:
service:
description: Specification of the service that exposes pgAdmin.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7080,6 +7080,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed when type
is NodePort or LoadBalancer. Value must be in-range and not
Expand Down Expand Up @@ -11640,6 +11647,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed
when type is NodePort or LoadBalancer. Value must be
Expand Down
14 changes: 14 additions & 0 deletions config/crd/bases/pgv2.percona.com_perconapgclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7153,6 +7153,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed when type
is NodePort or LoadBalancer. Value must be in-range and not
Expand Down Expand Up @@ -11713,6 +11720,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed
when type is NodePort or LoadBalancer. Value must be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13783,6 +13783,13 @@ spec:
service:
description: Specification of the service that exposes PgBouncer.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -14109,6 +14116,13 @@ spec:
description: Specification of the service that exposes the PostgreSQL
primary instance.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -15663,6 +15677,13 @@ spec:
service:
description: Specification of the service that exposes pgAdmin.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down
35 changes: 35 additions & 0 deletions deploy/bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7153,6 +7153,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed when type
is NodePort or LoadBalancer. Value must be in-range and not
Expand Down Expand Up @@ -11713,6 +11720,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed
when type is NodePort or LoadBalancer. Value must be
Expand Down Expand Up @@ -27513,6 +27527,13 @@ spec:
service:
description: Specification of the service that exposes PgBouncer.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -27839,6 +27860,13 @@ spec:
description: Specification of the service that exposes the PostgreSQL
primary instance.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -29393,6 +29421,13 @@ spec:
service:
description: Specification of the service that exposes pgAdmin.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down
4 changes: 4 additions & 0 deletions deploy/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ spec:
# labels:
# my-label: value2
# type: LoadBalancer
# loadBalancerSourceRanges:
# - 10.0.0.0/8

instances:
- name: instance1
Expand Down Expand Up @@ -130,6 +132,8 @@ spec:
# labels:
# my-label: value2
# type: LoadBalancer
# loadBalancerSourceRanges:
# - 10.0.0.0/8
#
# affinity:
# podAntiAffinity:
Expand Down
35 changes: 35 additions & 0 deletions deploy/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7153,6 +7153,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed when type
is NodePort or LoadBalancer. Value must be in-range and not
Expand Down Expand Up @@ -11713,6 +11720,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed
when type is NodePort or LoadBalancer. Value must be
Expand Down Expand Up @@ -27513,6 +27527,13 @@ spec:
service:
description: Specification of the service that exposes PgBouncer.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -27839,6 +27860,13 @@ spec:
description: Specification of the service that exposes the PostgreSQL
primary instance.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -29393,6 +29421,13 @@ spec:
service:
description: Specification of the service that exposes pgAdmin.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down
35 changes: 35 additions & 0 deletions deploy/cw-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7153,6 +7153,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed when type
is NodePort or LoadBalancer. Value must be in-range and not
Expand Down Expand Up @@ -11713,6 +11720,13 @@ spec:
additionalProperties:
type: string
type: object
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
nodePort:
description: The port on which this service is exposed
when type is NodePort or LoadBalancer. Value must be
Expand Down Expand Up @@ -27513,6 +27527,13 @@ spec:
service:
description: Specification of the service that exposes PgBouncer.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -27839,6 +27860,13 @@ spec:
description: Specification of the service that exposes the PostgreSQL
primary instance.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP CIDRs allowed
access to load. This field will be ignored if the cloud-provider
does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down Expand Up @@ -29393,6 +29421,13 @@ spec:
service:
description: Specification of the service that exposes pgAdmin.
properties:
loadBalancerSourceRanges:
description: LoadBalancerSourceRanges is a list of IP
CIDRs allowed access to load. This field will be ignored
if the cloud-provider does not support the feature.
items:
type: string
type: array
metadata:
description: Metadata contains metadata for custom resources
properties:
Expand Down
Loading

0 comments on commit 8cf7d6d

Please sign in to comment.