diff --git a/roles/ckan/templates/kubernetes/aks/ckan_volumes.yaml b/roles/ckan/templates/kubernetes/aks/ckan_volumes.yaml index 229df8d..5733a01 100644 --- a/roles/ckan/templates/kubernetes/aks/ckan_volumes.yaml +++ b/roles/ckan/templates/kubernetes/aks/ckan_volumes.yaml @@ -1,12 +1,22 @@ --- +apiVersion: storage.k8s.io/v1 +kind: StorageClass +metadata: + name: azureblob-nfs-premium +provisioner: file.csi.azure.com +volumeBindingMode: Immediate +allowVolumeExpansion: true +mountOptions: + - uid=900 + - gid=900 + apiVersion: v1 kind: PersistentVolumeClaim metadata: labels: app: ckan - name: ckan-resources-blob + name: ckan-resources spec: - persistentVolumeReclaimPolicy: Retain accessModes: - ReadWriteMany storageClassName: azureblob-nfs-premium @@ -20,9 +30,8 @@ kind: PersistentVolumeClaim metadata: labels: app: ckan - name: ckan-webassets-blob + name: ckan-webassets spec: - persistentVolumeReclaimPolicy: Retain accessModes: - ReadWriteMany storageClassName: azureblob-nfs-premium @@ -36,12 +45,11 @@ kind: PersistentVolumeClaim metadata: labels: app: ckan - name: ckan-storage-blob + name: ckan-storage spec: - persistentVolumeReclaimPolicy: Retain accessModes: - ReadWriteMany storageClassName: azureblob-nfs-premium resources: requests: - storage: 1Gi \ No newline at end of file + storage: 1Gi diff --git a/roles/ckan/templates/kubernetes/ckandb_job.yaml b/roles/ckan/templates/kubernetes/ckandb_job.yaml index d0b3eca..fee7475 100644 --- a/roles/ckan/templates/kubernetes/ckandb_job.yaml +++ b/roles/ckan/templates/kubernetes/ckandb_job.yaml @@ -26,7 +26,7 @@ spec: value: "{{ rds_admin_username }}" - name: POSTGRES_PASSWORD value: "{{ ckan_postgres_password }}" - + name: ckan-db-init image: postgres:13 command: ['bash', '-c'] diff --git a/roles/setup-aks/tasks/main.yml b/roles/setup-aks/tasks/main.yml index dc436a2..d86ae73 100644 --- a/roles/setup-aks/tasks/main.yml +++ b/roles/setup-aks/tasks/main.yml @@ -65,6 +65,12 @@ --name {{resource_prefix}}-aks \ --resource-group {{ resource_group_name }} \ +- name: Allow AKS to access ACR + command: > + az aks update --attach-acr {{acr_name}} \ + --name {{resource_prefix}}-aks \ + --resource-group {{ resource_group_name }} + # TODO: (Maybe) Remove public control plane network with CLI - name: Create a storage account for the data lake azure_rm_storageaccount: