Skip to content

Commit

Permalink
Add e2e IPAM example manifests for IPv4 and IPv6
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit-0505 committed Oct 29, 2024
1 parent 7929bba commit 4ea387d
Show file tree
Hide file tree
Showing 10 changed files with 101 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/samples/e2e/IPAM-example-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 ./`)
7 changes: 7 additions & 0 deletions config/samples/e2e/IPAM-example-IPv4/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: test

resources:
- ../bases/IPAM-example-IPv4
10 changes: 10 additions & 0 deletions config/samples/e2e/IPAM-example-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 ./`)
7 changes: 7 additions & 0 deletions config/samples/e2e/IPAM-example-IPv6/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: test

resources:
- ../bases/IPAM-example-IPv6
22 changes: 22 additions & 0 deletions config/samples/e2e/bases/IPAM-example-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-example-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-example-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-example-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-example-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-example-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

0 comments on commit 4ea387d

Please sign in to comment.