Skip to content

Commit 1233ce6

Browse files
committed
Renamed endpoint to masterEndpoint in ArangoDeploymentReplication
1 parent 80f1f77 commit 1233ce6

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pkg/apis/replication/v1alpha/endpoint_spec.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ type EndpointSpec struct {
3636
// DeploymentName holds the name of an ArangoDeployment resource.
3737
// If set this provides default values for masterEndpoint, auth & tls.
3838
DeploymentName *string `json:"deploymentName,omitempty"`
39-
// Endpoint holds a list of URLs used to reach the syncmaster(s).
40-
Endpoint []string `json:"endpoint,omitempty"`
39+
// MasterEndpoint holds a list of URLs used to reach the syncmaster(s).
40+
MasterEndpoint []string `json:"masterEndpoint,omitempty"`
4141
// Authentication holds settings needed to authentication at the syncmaster.
4242
Authentication EndpointAuthenticationSpec `json:"auth"`
4343
// TLS holds settings needed to verify the TLS connection to the syncmaster.
@@ -60,13 +60,13 @@ func (s EndpointSpec) Validate(isSourceEndpoint bool) error {
6060
if err := k8sutil.ValidateOptionalResourceName(s.GetDeploymentName()); err != nil {
6161
return maskAny(err)
6262
}
63-
for _, ep := range s.Endpoint {
63+
for _, ep := range s.MasterEndpoint {
6464
if _, err := url.Parse(ep); err != nil {
6565
return maskAny(errors.Wrapf(ValidationError, "Invalid master endpoint '%s': %s", ep, err))
6666
}
6767
}
6868
hasDeploymentName := s.HasDeploymentName()
69-
if !hasDeploymentName && len(s.Endpoint) == 0 {
69+
if !hasDeploymentName && len(s.MasterEndpoint) == 0 {
7070
return maskAny(errors.Wrapf(ValidationError, "Provide a deploy name or at least one master endpoint"))
7171
}
7272
if err := s.Authentication.Validate(isSourceEndpoint || !hasDeploymentName); err != nil {

pkg/apis/replication/v1alpha/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ func (in *EndpointSpec) DeepCopyInto(out *EndpointSpec) {
240240
**out = **in
241241
}
242242
}
243-
if in.Endpoint != nil {
244-
in, out := &in.Endpoint, &out.Endpoint
243+
if in.MasterEndpoint != nil {
244+
in, out := &in.MasterEndpoint, &out.MasterEndpoint
245245
*out = make([]string, len(*in))
246246
copy(*out, *in)
247247
}

pkg/replication/sync_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func (dr *DeploymentReplication) createArangoSyncEndpoint(epSpec api.EndpointSpe
113113
dnsName := k8sutil.CreateSyncMasterClientServiceDNSName(depl)
114114
return client.Endpoint{"https://" + net.JoinHostPort(dnsName, strconv.Itoa(k8sutil.ArangoSyncMasterPort))}, nil
115115
}
116-
return client.Endpoint(epSpec.Endpoint), nil
116+
return client.Endpoint(epSpec.MasterEndpoint), nil
117117
}
118118

119119
// createArangoSyncTLSAuthentication creates the authentication needed to authenticate

0 commit comments

Comments
 (0)