Created
August 26, 2019 20:17
-
-
Save SpicySyntax/1ee3ef06241448fa8205d20de706969a to your computer and use it in GitHub Desktop.
PV Tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: mypod | |
spec: | |
containers: | |
- image: nginx:1.15.5 | |
name: mypod | |
resources: | |
requests: | |
cpu: 100m | |
memory: 128Mi | |
limits: | |
cpu: 250m | |
memory: 256Mi | |
volumeMounts: | |
- name: azure | |
mountPath: /mnt/azure | |
volumes: | |
- name: azure | |
azureFile: | |
secretName: azure-secret | |
shareName: aksshare | |
readOnly: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ template "crack-detection-classification.fullname" . }} | |
namespace: {{ .Values.general.namespace }} | |
labels: | |
app: {{ template "crack-detection-classification.name" . }} | |
chart: {{ .Chart.Name }}-{{ .Chart.Version }} | |
release: {{ .Release.Name }} | |
heritage: {{ .Release.Service }} | |
spec: | |
replicas: 1 | |
strategy: | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 1 | |
minReadySeconds: 5 | |
selector: | |
matchLabels: | |
app: {{ template "crack-detection-classification.name" . }} | |
release: {{ .Release.Name }} | |
template: | |
metadata: | |
labels: | |
app: {{ template "crack-detection-classification.name" . }} | |
release: {{ .Release.Name }} | |
spec: | |
nodeSelector: | |
app: python-backend-node | |
containers: | |
- name: {{ .Values.container.name }} | |
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | |
imagePullPolicy: {{ .Values.image.pullPolicy }} | |
ports: | |
- containerPort: {{ .Values.container.port }} | |
resources: | |
requests: | |
cpu: {{ .Values.container.requests.cpu }} | |
memory: {{ .Values.container.requests.memory }} | |
env: | |
- name: AzureWebJobsStorage | |
value: "{{ .Values.container.env.AzureWebJobsStorage }}" | |
- name: APPINSIGHTS_INSTRUMENTATIONKEY | |
value: "{{ .Values.container.env.APPINSIGHTS_INSTRUMENTATIONKEY }}" | |
- name: AzureFunctionsJobHost__Logging__Console__IsEnabled | |
value: "{{ .Values.container.env.AzureFunctionsJobHost__Logging__Console__IsEnabled }}" | |
- name: LogDispatcherUrl | |
value: "{{ .Values.container.env.LogDispatcherUrl }}" | |
volumes: | |
- name: model-data | |
persistentVolumeClaim: | |
claimName: azurefile | |
imagePullSecrets: | |
- name: {{ .Values.image.pullSecret }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: azurefile | |
# Set this annotation to NOT let Kubernetes automatically create | |
# a persistent volume for this volume claim. | |
annotations: | |
volume.beta.kubernetes.io/storage-class: "" | |
spec: | |
storageClassName: manual | |
resources: | |
requests: | |
storage: 500Mi | |
accessModes: | |
- ReadOnlyMany | |
selector: | |
# To make sure we match the claim with the exact volume, match the label | |
matchLabels: | |
usage: azurefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: azurefile | |
spec: | |
capacity: | |
storage: 5Gi | |
accessModes: | |
- ReadWriteMany | |
azureFile: | |
secretName: azure-secret | |
shareName: aksshare | |
readOnly: false | |
mountOptions: | |
- dir_mode=0777 | |
- file_mode=0777 | |
- uid=1000 | |
- gid=1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment