Skip to content

Commit

Permalink
NiFi and Zookeeper deployments (#27)
Browse files Browse the repository at this point in the history
* Separated Kubernetes deployments of Apache NiFi and Zookeeper to their respective directories This allows us to modularise deployment of services and replace each component separately if needed - or replace them if required with your own choice of deployment

* Updated Apache NiFi configuration certificate and dns name

This will set consistent dns name to NiFI application
  • Loading branch information
saidsef authored Aug 4, 2023
1 parent cf35d5a commit 9640b96
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 34 deletions.
33 changes: 3 additions & 30 deletions deployment/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonAnnotations:
app.kubernetes.io/deployed-by: kustomization
app.kubernetes.io/managed-by: kustomization

resources:
- ingress.yml
- nifi-configmap.yml
- nifi-ssl-configmap.yml
- nifi.yml
- nifi-hpa.yml
- nifi-secrets.yml
- nifi-service.yml
- zookeeper-configmap.yml
- zookeeper-service.yml
- zookeeper.yml

images:
- name: nifi
newName: docker.io/apache/nifi
newTag: "1.23.0"
- name: zookeeper
newName: docker.io/zookeeper
newTag: "3.8"
- name: wait
newName: docker.io/busybox
newTag: "1.36"

vars:
- fieldref: {}
name: HOST
objref:
apiVersion: networking.k8s.io/v1
kind: Ingress
name: nifi
- nifi/
- zookeeper/
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion deployment/ingress.yml → deployment/nifi/ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
server_tokens off;
spec:
rules:
- host: $(HOST)
- host: nifi
http:
paths:
- path: /
Expand Down
23 changes: 23 additions & 0 deletions deployment/nifi/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonAnnotations:
app.kubernetes.io/managed-by: kustomization

resources:
- ingress.yml
- configmap.yml
- ssl-configmap.yml
- nifi.yml
- hpa.yml
- secrets.yml
- service.yml

images:
- name: nifi
newName: docker.io/apache/nifi
newTag: "1.23.0"
- name: wait
newName: docker.io/busybox
newTag: "1.36"
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ data:
ORGANISATION_UNIT=${ORGANISATION_UNIT:-'Cloud Services Application'}
ORGANISATION=${ORGANISATION:-'Cloud Services'}
PUBLIC_DNS=${PUBLIC_DNS:-'nifi.tld'}
PUBLIC_DNS=${POD_NAME:-'nifi.tld'}
CITY=${CITY:-'London'}
STATE=${STATE:-'London'}
COUNTRY_CODE=${COUNTRY_CODE:-'GB'}
Expand All @@ -27,7 +27,7 @@ data:
then
echo "Creating keystore"
keytool -genkey -noprompt -alias nifi-keystore \
-dname "CN=${HOSTNAME},OU=${ORGANISATION_UNIT},O=${ORGANISATION},L=${CITY},S=${STATE},C=${COUNTRY_CODE}" \
-dname "CN=${POD_NAME},OU=${ORGANISATION_UNIT},O=${ORGANISATION},L=${CITY},S=${STATE},C=${COUNTRY_CODE}" \
-keystore ${NIFI_HOME}/keytool/keystore.p12 \
-storepass ${KEYSTORE_PASS:-$NIFI_SENSITIVE_PROPS_KEY} \
-KeySize 2048 \
Expand All @@ -40,7 +40,7 @@ data:
then
echo "Creating truststore"
keytool -genkey -noprompt -alias nifi-truststore \
-dname "CN=${HOSTNAME},OU=${ORGANISATION_UNIT},O=${ORGANISATION},L=${CITY},S=${STATE},C=${COUNTRY_CODE}" \
-dname "CN=${POD_NAME},OU=${ORGANISATION_UNIT},O=${ORGANISATION},L=${CITY},S=${STATE},C=${COUNTRY_CODE}" \
-keystore ${NIFI_HOME}/keytool/truststore.jks \
-storetype jks \
-keypass ${KEYSTORE_PASS:-$NIFI_SENSITIVE_PROPS_KEY} \
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions deployment/zookeeper/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

commonAnnotations:
app.kubernetes.io/managed-by: kustomization

resources:
- configmap.yml
- service.yml
- zookeeper.yml

images:
- name: zookeeper
newName: docker.io/zookeeper
newTag: "3.8"
File renamed without changes.
File renamed without changes.

0 comments on commit 9640b96

Please sign in to comment.