1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Feature] Switch ID to be IP based (#800)

This commit is contained in:
Adam Janikowski 2021-10-01 10:27:41 +02:00 committed by GitHub
parent a7f8b4744e
commit 31802fd6c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -3,6 +3,7 @@
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- Replace `beta.kubernetes.io/arch` Pod label with `kubernetes.io/arch` using Silent Rotation
- Add "Short Names" feature
- Switch ArangoDB Image Discovery process from Headless Service to Pod IP
## [1.2.3](https://github.com/arangodb/kube-arangodb/tree/1.2.3) (2021-09-24)
- Update UBI Image to 8.4

View file

@ -170,7 +170,7 @@ func (ib *imagesBuilder) fetchArangoDBImageIDAndVersion(ctx context.Context, cac
}
// Try fetching the ArangoDB version
client, err := arangod.CreateArangodImageIDClient(ctx, ib.APIObject, role, id)
client, err := arangod.CreateArangodImageIDClient(ctx, ib.APIObject, pod.Status.PodIP)
if err != nil {
log.Warn().Err(err).Msg("Failed to create Image ID Pod client")
return true, nil

View file

@ -168,10 +168,9 @@ func CreateArangodDatabaseClient(ctx context.Context, cli corev1.CoreV1Interface
// CreateArangodImageIDClient creates a go-driver client for an ArangoDB instance
// running in an Image-ID pod.
func CreateArangodImageIDClient(ctx context.Context, deployment k8sutil.APIObject, role, id string) (driver.Client, error) {
func CreateArangodImageIDClient(ctx context.Context, deployment k8sutil.APIObject, ip string) (driver.Client, error) {
// Create connection
dnsName := k8sutil.CreatePodDNSNameWithDomain(deployment, nil, role, id)
c, err := createArangodClientForDNSName(ctx, nil, nil, dnsName, false)
c, err := createArangodClientForDNSName(ctx, nil, nil, ip, false)
if err != nil {
return nil, errors.WithStack(err)
}