Skip to content

Commit

Permalink
e2e: support infoblox provider
Browse files Browse the repository at this point in the history
  • Loading branch information
alebedev87 committed Mar 28, 2022
1 parent 3a17ad6 commit f4c4e72
Show file tree
Hide file tree
Showing 93 changed files with 23,868 additions and 984 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,18 @@ Prepare your environment for the installation commands.
For AWS:
```sh
export KUBECONFIG=/path/to/mycluster/kubeconfig
export CLOUD_PROVIDER=AWS
export DNS_PROVIDER=AWS
export AWS_ACCESS_KEY_ID=my-aws-access-key
export AWS_SECRET_ACCESS_KEY=my-aws-access-secret
```
For Infoblox:
```sh
export KUBECONFIG=/path/to/mycluster/kubeconfig
export DNS_PROVIDER=INFOBLOX
export INFOBLOX_GRID_HOST=100.100.100.100
export INFOBLOX_WAPI_USERNAME=my-infoblox-username
export INFOBLOX_WAPI_PASSWORD=my-infoblox-password
```
For the other providers: check out [e2e directory](./test/e2e/).
3. Run the test suite
Expand Down
2 changes: 1 addition & 1 deletion bundle/manifests/externaldns.olm.openshift.io_crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.0
controller-gen.kubebuilder.io/version: v0.6.2
creationTimestamp: null
name: externaldnses.externaldns.olm.openshift.io
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.0
controller-gen.kubebuilder.io/version: v0.6.2
creationTimestamp: null
name: externaldnses.externaldns.olm.openshift.io
spec:
Expand Down
16 changes: 16 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
name: aws-access-key
zones: # Replace with the desired hosted zone IDs
- "Z3URY6TWQ91KXX"
source:
type: Service
fqdnTemplate:
- '{{.Name}}.mydomain.net'
```

Once this is created the _external-dns-operator_ will create a deployment of _external-dns_ which is configured to
Expand Down Expand Up @@ -90,6 +94,10 @@ spec:
wapiVersion: # the WAPI version, eg: 2.11, 2.3.1
zones: # Replace with the desired hosted zones
- "ZG5zLm5ldHdvcmtfdmlldyQw"
source:
type: Service
fqdnTemplate:
- '{{.Name}}.mydomain.net'
```

Once this is created the _external-dns-operator_ will create a deployment of _external-dns_ which is configured to
Expand Down Expand Up @@ -182,6 +190,10 @@ spec:
project: gcp-devel
zones: # Replace with the desired managed zones
- "3651032588905568971"
source:
type: Service
fqdnTemplate:
- '{{.Name}}.mydomain.net'
```

# Azure
Expand Down Expand Up @@ -228,4 +240,8 @@ spec:
name: azure-config-file
zones: # Replace with the desired hosted zones
- "myzoneid"
source:
type: Service
fqdnTemplate:
- '{{.Name}}.mydomain.net'
```
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ require (
github.com/go-logr/logr v0.4.0
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/google/go-cmp v0.5.6
github.com/infobloxopen/infoblox-go-client v1.1.1
github.com/miekg/dns v1.0.14
github.com/onsi/ginkgo v1.16.4
github.com/onsi/gomega v1.15.0
github.com/openshift/api v0.0.0-20211019100638-b2cbe79f2e4b
github.com/openshift/cloud-credential-operator v0.0.0-20211118210017-9066dcc747fa
github.com/operator-framework/api v0.11.0
golang.org/x/crypto v0.0.0-20211209193657-4570a0811e8b // indirect
google.golang.org/api v0.58.0
k8s.io/api v0.22.1
Expand All @@ -23,5 +25,5 @@ require (
k8s.io/utils v0.0.0-20210802155522-efc7438f0176
sigs.k8s.io/controller-runtime v0.10.0
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20211004203041-b1efff64d3d2
sigs.k8s.io/controller-tools v0.6.0
sigs.k8s.io/controller-tools v0.6.2
)
73 changes: 55 additions & 18 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/e2e/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (a *awsTestHelper) buildExternalDNS(name, zoneID, zoneDomain string, credsS
return resource
}

func (a *awsTestHelper) buildOpenShiftExternalDNS(name, zoneID, zoneDomain, routerName string) operatorv1alpha1.ExternalDNS {
func (a *awsTestHelper) buildOpenShiftExternalDNS(name, zoneID, zoneDomain, routerName string, _ *corev1.Secret) operatorv1alpha1.ExternalDNS {
resource := routeExternalDNS(name, zoneID, zoneDomain, routerName)
resource.Spec.Provider = operatorv1alpha1.ExternalDNSProvider{
Type: operatorv1alpha1.ProviderTypeAWS,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (a *azureTestHelper) buildExternalDNS(name, zoneID, zoneDomain string, cred
return resource
}

func (a *azureTestHelper) buildOpenShiftExternalDNS(name, zoneID, zoneDomain, routerName string) operatorv1alpha1.ExternalDNS {
func (a *azureTestHelper) buildOpenShiftExternalDNS(name, zoneID, zoneDomain, routerName string, _ *corev1.Secret) operatorv1alpha1.ExternalDNS {
resource := routeExternalDNS(name, zoneID, zoneDomain, routerName)
resource.Spec.Provider = operatorv1alpha1.ExternalDNSProvider{
Type: operatorv1alpha1.ProviderTypeAzure,
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (g *gcpTestHelper) buildExternalDNS(name, zoneID, zoneDomain string, credsS
return resource
}

func (g *gcpTestHelper) buildOpenShiftExternalDNS(name, zoneID, zoneDomain, routerName string) operatorv1alpha1.ExternalDNS {
func (g *gcpTestHelper) buildOpenShiftExternalDNS(name, zoneID, zoneDomain, routerName string, _ *corev1.Secret) operatorv1alpha1.ExternalDNS {
resource := routeExternalDNS(name, zoneID, zoneDomain, routerName)
resource.Spec.Provider = operatorv1alpha1.ExternalDNSProvider{
Type: operatorv1alpha1.ProviderTypeGCP,
Expand Down
Loading

0 comments on commit f4c4e72

Please sign in to comment.