Skip to content

Instantly share code, notes, and snippets.

@sjwaight
Created June 24, 2019 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjwaight/83aa95e68fde9c35400018d6c2d7a268 to your computer and use it in GitHub Desktop.
Save sjwaight/83aa95e68fde9c35400018d6c2d7a268 to your computer and use it in GitHub Desktop.
Deployment file to publish Azure Function app to Kubernetes using KEDA
data:
AzureWebJobsStorage: XXXXX
FUNCTIONS_WORKER_RUNTIME: XXXX
kedademo01_STORAGE: XXXXX
VIDEOCONTAINER: XXXXX
THUMBNAILCONTAINER: XXXX
VIDEOFILESTORAGE: XXXXX
STORAGE_ACCOUNT_NAME: XXXX
ACCOUNT_ACCESS_KEY: XXXXX
apiVersion: v1
kind: Secret
metadata:
name: video-thumbnailer
namespace: default
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: video-thumbnailer
namespace: default
labels:
app: video-thumbnailer
spec:
selector:
matchLabels:
app: video-thumbnailer
template:
metadata:
labels:
app: video-thumbnailer
spec:
containers:
- name: video-thumbnailer
image: my_acr_instance.azurecr.io/custom-func-node:1.3
env:
- name: AzureFunctionsJobHost__functions__0
value: VideoThumbnailProcessor
envFrom:
- secretRef:
name: video-thumbnailer
tolerations:
- operator: Exists
---
apiVersion: keda.k8s.io/v1alpha1
kind: ScaledObject
metadata:
name: video-thumbnailer
namespace: default
labels:
deploymentName: video-thumbnailer
spec:
scaleTargetRef:
deploymentName: video-thumbnailer
triggers:
- type: azure-queue
metadata:
name: myQueueItem
type: queueTrigger
direction: in
queueName: new-videos
queueLength: '2'
connection: kedademo01_STORAGE
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment