DATABASE_URL=postgres:[PASSWORD]@[URL]:5432/fastapi
POSTGRES_USER=postgres
POSTGRES_PASSWORD=[PASSWORD]
POSTGRES_DB=[DB_NAME]
! Before Commit and deployment to Azure:
- Make an App Registration
- Give it Contributor access to the Subscription
- Dockerize the application
- Build & deploy to AKS
apiVersion: v1
kind: ServiceAccount
metadata:
name: [FLUX-APPLIER_NAME]
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: [FLUX-APPLIER_NAME]-role
rules:
- apiGroups: [""] # Core API group
resources: ["services", "configmaps", "secrets", "persistentvolumeclaims"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: [FLUX-APPLIER_NAME]-binding
subjects:
- kind: ServiceAccount
name: [FLUX-APPLIER_NAME]
namespace: default
roleRef:
kind: ClusterRole
name: [FLUX-APPLIER_NAME]-role
apiGroup: rbac.authorization.k8s.io
