Skip to content

Commit

Permalink
external: fqdn should be persisted
Browse files Browse the repository at this point in the history
1) donot change rgw fqdn to ip if provided,
As now the bucket class supports the
entry of fqdn

2) update crds with new description in EndpointAddress

Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit f66de7b)
Signed-off-by: parth-gr <paarora@redhat.com>
  • Loading branch information
parth-gr committed Jul 10, 2023
1 parent bc1e980 commit b6c3d8d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
1 change: 1 addition & 0 deletions Documentation/CRDs/Object-Storage/ceph-object-store-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ gateway:
port: 80
externalRgwEndpoints:
- ip: 192.168.39.182
# hostname: example.com
```

This will create a service with the endpoint `192.168.39.182` on port `80`, pointing to the Ceph object external gateway.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ spec:
port: 8080
externalRgwEndpoints:
- ip: 192.168.39.182
# hostname: example.com
healthCheck:
bucket:
enabled: true
Expand Down
4 changes: 2 additions & 2 deletions deploy/charts/rook-ceph/templates/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11489,10 +11489,10 @@ spec:
description: EndpointAddress is a tuple that describes a single IP address or host name. This is a subset of Kubernetes's v1.EndpointAddress.
properties:
hostname:
description: The Hostname of this endpoint
description: The DNS-addressable Hostname of this endpoint. This field will be preferred over IP if both are given.
type: string
ip:
description: The IP of this endpoint.
description: The IP of this endpoint. As a legacy behavior, this supports being given a DNS-adressable hostname as well.
type: string
type: object
nullable: true
Expand Down
4 changes: 2 additions & 2 deletions deploy/examples/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11481,10 +11481,10 @@ spec:
description: EndpointAddress is a tuple that describes a single IP address or host name. This is a subset of Kubernetes's v1.EndpointAddress.
properties:
hostname:
description: The Hostname of this endpoint
description: The DNS-addressable Hostname of this endpoint. This field will be preferred over IP if both are given.
type: string
ip:
description: The IP of this endpoint.
description: The IP of this endpoint. As a legacy behavior, this supports being given a DNS-adressable hostname as well.
type: string
type: object
nullable: true
Expand Down
5 changes: 0 additions & 5 deletions deploy/examples/create-external-cluster-resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,6 @@ def validate_rgw_endpoint(self, info_cap_supported):

# check if the rgw endpoint is reachable
rgw_endpoint = self._arg_parser.rgw_endpoint
self._invalid_endpoint(rgw_endpoint)
cert = None
if not self._arg_parser.rgw_skip_tls and self.validate_rgw_endpoint_tls_cert():
cert = self._arg_parser.rgw_tls_cert_path
Expand Down Expand Up @@ -1423,10 +1422,6 @@ def _gen_output_map(self):
self._arg_parser.cluster_name = (
self._arg_parser.cluster_name.lower()
) # always convert cluster name to lowercase characters
if self._arg_parser.rgw_endpoint:
self._arg_parser.rgw_endpoint = self.convert_fqdn_rgw_endpoint_to_ip(
self._arg_parser.rgw_endpoint
)
self.validate_rbd_pool()
self.validate_rados_namespace()
self.validate_subvolume_group()
Expand Down
1 change: 1 addition & 0 deletions deploy/examples/object-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
port: 80
externalRgwEndpoints:
- ip: 192.168.39.182
# hostname: example.com
healthCheck:
bucket:
disabled: false
Expand Down
5 changes: 3 additions & 2 deletions pkg/apis/ceph.rook.io/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1442,10 +1442,11 @@ type GatewaySpec struct {
// Kubernetes's v1.EndpointAddress.
// +structType=atomic
type EndpointAddress struct {
// The IP of this endpoint.
// The IP of this endpoint. As a legacy behavior, this supports being given a DNS-adressable hostname as well.
// +optional
IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"`
// The Hostname of this endpoint

// The DNS-addressable Hostname of this endpoint. This field will be preferred over IP if both are given.
// +optional
Hostname string `json:"hostname,omitempty" protobuf:"bytes,3,opt,name=hostname"`
}
Expand Down

0 comments on commit b6c3d8d

Please sign in to comment.