Skip to content

Commit

Permalink
Merge pull request #4 from bc185174/add-kustomize-deployment
Browse files Browse the repository at this point in the history
added kustomizations
  • Loading branch information
kvaps authored Feb 5, 2023
2 parents a14eb1b + 3f0cb44 commit 80e2b9d
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ bin
*.swp
*.swo
*~

# vscode
.vscode
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,16 @@ A Dnsmasq-controller for Kubernetes, implemented in go using [kubebuilder](https

```bash
# CRDs
kubectl apply -f config/crd/bases/
kubectl apply -k config/crd/bases

# RBAC
kubectl apply -n default \
-f config/rbac/service_account.yaml \
-f config/rbac/role.yaml \
-f config/rbac/role_binding.yaml \
-f config/rbac/leader_election_role.yaml \
-f config/rbac/leader_election_role_binding.yaml
kubectl apply -k config/rbac

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

# DHCP-server
kubectl apply -n default -f config/controller/dhcp-server.yaml
kubectl apply -k config/dhcp-server

# Add dnsmasq role to your nodes
kubectl label node <node1> <node2> <node3> node-role.kubernetes.io/dnsmasq=
Expand Down
7 changes: 7 additions & 0 deletions config/crd/bases/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- dnsmasq.kvaps.cf_dhcphosts.yaml
- dnsmasq.kvaps.cf_dhcpoptions.yaml
- dnsmasq.kvaps.cf_dnshosts.yaml
- dnsmasq.kvaps.cf_dnsmasqoptions.yaml
File renamed without changes.
4 changes: 4 additions & 0 deletions config/dhcp-server/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- dhcp-server.yaml
File renamed without changes.
4 changes: 4 additions & 0 deletions config/dns-server/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- dns-server.yaml
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions config/rbac-viewer-editor/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- dhcphosts_editor_role.yaml
- dhcphosts_viewer_role.yaml
- dhcpoptions_editor_role.yaml
- dhcpoptions_viewer_role.yaml
- dnshosts_editor_role.yaml
- dnshosts_viewer_role.yaml
- dnsmasqoptions_editor_role.yaml
- dnsmasqoptions_viewer_role.yaml
8 changes: 8 additions & 0 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- leader_election_role_binding.yaml
- leader_election_role.yaml
- role_binding.yaml
- role.yaml
- service_account.yaml
7 changes: 7 additions & 0 deletions config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- dnsmasq_v1beta1_dhcphosts.yaml
- dnsmasq_v1beta1_dhcpoptions.yaml
- dnsmasq_v1beta1_dnshosts.yaml
- dnsmasq_v1beta1_dnsmasqoptions.yaml

0 comments on commit 80e2b9d

Please sign in to comment.