Skip to content

Commit

Permalink
Added coredns-custom config details
Browse files Browse the repository at this point in the history
  • Loading branch information
Naveen Angali authored and Naveen Angali committed Oct 6, 2023
1 parent edb60b7 commit 7b581f3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Azure-ARM/coredns-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns-custom
namespace: kube-system
data:
Profisee.server: |
$EXTERNALDNSNAME:53 {
rewrite name $EXTERNALDNSNAME nginx-ingress-nginx-controller.profisee.svc.cluster.local
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ipv6.arpa
ttl 30
}
}
8 changes: 7 additions & 1 deletion Azure-ARM/deployprofisee.sh
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ if [ "$WINDOWS_NODE_VERSION" = "Windows2019" ]; then
helm repo add azurefile-csi-driver https://raw.githubusercontent.com/kubernetes-sigs/azurefile-csi-driver/master/charts
helm repo update azurefile-csi-driver
#Controller Replicas MUST be 2 in Prod, okay to be 1 in Dev (i.e. do NOT add --set controller.replica=1 in Prod). This is dependent on number of available Linux nodes in the nodepool. In Prod, it is minimum of 2, Dev is 1.
helm install azurefile-csi-driver azurefile-csi-driver/azurefile-csi-driver --namespace kube-system --set controller.replicas=1
helm install azurefile-csi-driver azurefile-csi-driver/azurefile-csi-driver --namespace kube-system --set controller.replicas=1
echo $"Azure File CSI Driver installation finished."
fi

Expand All @@ -511,6 +511,9 @@ echo $"The safe RAM value to assign to Profisee pod is $saferamvalueinkibibytes.
# echo $"Profisee's stateful set has been patched to use $safecpuvalueinmilicores for CPU."
# kubectl patch statefulsets -n profisee profisee --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/resources/limits/memory", "value":'"$saferamvalueinkibibytes"'}]'
# echo $"Profisee's stateful set has been patched to use $saferamvalueinkibibytes for RAM."
#settings DNSName value to custom coredns-configmap
curl -fsSL -o coredns-config.yaml "$REPOURL/Azure-ARM/coredns-config.yaml";
sed -i -e 's/$EXTERNALDNSNAME/'"$EXTERNALDNSNAME"'/g' coredns-config.yaml

#Setting values in the Settings.yaml
sed -i -e 's/$SQLNAME/'"$SQLNAME"'/g' Settings.yaml
Expand Down Expand Up @@ -592,6 +595,9 @@ fi
kubectl delete secret profisee-settings -n profisee --ignore-not-found
kubectl create secret generic profisee-settings -n profisee --from-file=Settings.yaml

#Replacing Coredns with custom coredns config map
kubectl replace -f ./coredns-config.yaml

#Adding this only in dev environment so SuperAdmin can edit the app registration values. Please do not implement this in Prod
ObjectId="$(az ad user show --id $ADMINACCOUNTNAME --query id -o tsv)"
echo $"ObjectId of ADMIN is $ObjectId";
Expand Down

0 comments on commit 7b581f3

Please sign in to comment.