Skip to content

Commit 3f0cb44

Browse files
committed
added kustomizations
1 parent a14eb1b commit 3f0cb44

18 files changed

+48
-9
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ bin
2222
*.swp
2323
*.swo
2424
*~
25+
26+
# vscode
27+
.vscode

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,16 @@ A Dnsmasq-controller for Kubernetes, implemented in go using [kubebuilder](https
4040

4141
```bash
4242
# CRDs
43-
kubectl apply -f config/crd/bases/
43+
kubectl apply -k config/crd/bases
4444

4545
# RBAC
46-
kubectl apply -n default \
47-
-f config/rbac/service_account.yaml \
48-
-f config/rbac/role.yaml \
49-
-f config/rbac/role_binding.yaml \
50-
-f config/rbac/leader_election_role.yaml \
51-
-f config/rbac/leader_election_role_binding.yaml
46+
kubectl apply -k config/rbac
5247

5348
# DNS-server (for infra.example.org)
54-
kubectl apply -n default -f config/controller/dns-server.yaml
49+
kubectl apply -k config/dns-server
5550

5651
# DHCP-server
57-
kubectl apply -n default -f config/controller/dhcp-server.yaml
52+
kubectl apply -k config/dhcp-server
5853

5954
# Add dnsmasq role to your nodes
6055
kubectl label node <node1> <node2> <node3> node-role.kubernetes.io/dnsmasq=

config/crd/bases/kustomization.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- dnsmasq.kvaps.cf_dhcphosts.yaml
5+
- dnsmasq.kvaps.cf_dhcpoptions.yaml
6+
- dnsmasq.kvaps.cf_dnshosts.yaml
7+
- dnsmasq.kvaps.cf_dnsmasqoptions.yaml

config/dhcp-server/kustomization.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- dhcp-server.yaml
File renamed without changes.

config/dns-server/kustomization.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- dns-server.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- dhcphosts_editor_role.yaml
5+
- dhcphosts_viewer_role.yaml
6+
- dhcpoptions_editor_role.yaml
7+
- dhcpoptions_viewer_role.yaml
8+
- dnshosts_editor_role.yaml
9+
- dnshosts_viewer_role.yaml
10+
- dnsmasqoptions_editor_role.yaml
11+
- dnsmasqoptions_viewer_role.yaml

config/rbac/kustomization.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- leader_election_role_binding.yaml
5+
- leader_election_role.yaml
6+
- role_binding.yaml
7+
- role.yaml
8+
- service_account.yaml

config/samples/kustomization.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
resources:
4+
- dnsmasq_v1beta1_dhcphosts.yaml
5+
- dnsmasq_v1beta1_dhcpoptions.yaml
6+
- dnsmasq_v1beta1_dnshosts.yaml
7+
- dnsmasq_v1beta1_dnsmasqoptions.yaml

0 commit comments

Comments
 (0)