Skip to content

Commit

Permalink
Add e2e IPAM example manifests for IPv4 and IPv6 (#1145)
Browse files Browse the repository at this point in the history
* Add e2e `IPAM` example manifests for `IPv4` and `IPv6`

* address review comments

* address review comment
  • Loading branch information
Rohit-0505 authored Nov 13, 2024
1 parent d9c8f03 commit 6a612a0
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 0 deletions.
22 changes: 22 additions & 0 deletions config/samples/e2e/bases/ipam-ipv4/child-prefix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: ipam.ironcore.dev/v1alpha1
kind: Prefix
metadata:
name: customer-subnet-1
spec:
ipFamily: IPv4
prefixLength: 9
parentSelector:
matchLabels:
subnet-type: public
---
apiVersion: ipam.ironcore.dev/v1alpha1
kind: Prefix
metadata:
name: customer-subnet-2
spec:
ipFamily: IPv4
prefixLength: 9
parentSelector:
matchLabels:
subnet-type: public

3 changes: 3 additions & 0 deletions config/samples/e2e/bases/ipam-ipv4/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- parent-prefix.yaml
- child-prefix.yaml
8 changes: 8 additions & 0 deletions config/samples/e2e/bases/ipam-ipv4/parent-prefix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: ipam.ironcore.dev/v1alpha1
kind: Prefix
metadata:
name: root-1
labels:
subnet-type: public
spec:
prefix: 10.0.0.0/8
22 changes: 22 additions & 0 deletions config/samples/e2e/bases/ipam-ipv6/child-prefix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: ipam.ironcore.dev/v1alpha1
kind: Prefix
metadata:
name: customer-subnet-1
spec:
ipFamily: IPv6
prefixLength: 9
parentSelector:
matchLabels:
subnet-type: public
---
apiVersion: ipam.ironcore.dev/v1alpha1
kind: Prefix
metadata:
name: customer-subnet-2
spec:
ipFamily: IPv6
prefixLength: 9
parentSelector:
matchLabels:
subnet-type: public

3 changes: 3 additions & 0 deletions config/samples/e2e/bases/ipam-ipv6/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- parent-prefix.yaml
- child-prefix.yaml
9 changes: 9 additions & 0 deletions config/samples/e2e/bases/ipam-ipv6/parent-prefix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: ipam.ironcore.dev/v1alpha1
kind: Prefix
metadata:
name: root-1
labels:
subnet-type: public
spec:
prefix: 2000::/8

10 changes: 10 additions & 0 deletions config/samples/e2e/ipam-ipv4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# `IP` allocation to Subnets with `IPv4`

This example allocates IPs of type `IPv4` to child subnets with the specified prefix length referring to the parent prefix.
The following artifacts will be deployed in your namespace:
- 1 IronCore parent `Prefix`, and 2 child `Prefixes`

## Usage
1. Adapt the `namespace` in `kustomization.yaml`

2. Run (`kubectl apply -k ./`)
5 changes: 5 additions & 0 deletions config/samples/e2e/ipam-ipv4/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../bases/ipam-ipv4
10 changes: 10 additions & 0 deletions config/samples/e2e/ipam-ipv6/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# `IP` allocation to Subnets with `IPv6`

This example allocates IPs of type `IPv6` to child subnets with the specified prefix length referring to the parent prefix.
The following artifacts will be deployed in your namespace:
- 1 IronCore parent `Prefix`, and 2 child `Prefixes`

## Usage
1. Adapt the `namespace` in `kustomization.yaml`

2. Run (`kubectl apply -k ./`)
5 changes: 5 additions & 0 deletions config/samples/e2e/ipam-ipv6/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../bases/ipam-ipv6

0 comments on commit 6a612a0

Please sign in to comment.