Private Registries
Configure Function Runner access to private container registries
The Function Runner executes KRM functions in a secure, isolated environment.
args:
- --port=9445 # Server port (default: 9445)
- --disable-runtimes=exec,pod # Disable specific runtimes (exec, pod)
- --log-level=2 # Log verbosity level 0-5 (default: 2)
args:
- --functions=./functions # Path to cached functions (default: ./functions)
- --config=./config.yaml # Path to exec runtime config file (default: ./config.yaml)
args:
- --pod-cache-config=/pod-cache-config/pod-cache-config.yaml # Pod cache config file path
- --warm-up-pod-cache=true # Warm up pod cache on startup (default: true)
- --pod-namespace=porch-fn-system # Namespace for KRM function pods (default: porch-fn-system)
- --pod-ttl=30m # Pod TTL before GC (default: 30m)
- --scan-interval=1m # GC scan interval (default: 1m)
- --function-pod-template= # ConfigMap with pod specification
- --max-request-body-size=6291456 # Max gRPC message size in bytes (default: 6MB)
args:
- --enable-private-registries=false # Enable private registry support
- --registry-auth-secret-path=/var/tmp/config-secret/.dockerconfigjson # Registry auth secret path
- --registry-auth-secret-name=auth-secret # Registry auth secret name
- --enable-private-registries-tls=false # Enable TLS for private registries
- --tls-secret-path=/var/tmp/tls-secret/ # TLS secret path
env:
- name: WRAPPER_SERVER_IMAGE
value: "<wrapper-server-image>" # Required for pod runtime
The exec runtime runs functions as local executables:
args:
- --functions=./functions # Directory containing cached function executables
- --config=./config.yaml # Configuration file for exec runtime
The pod runtime runs functions as Kubernetes pods:
args:
- --pod-namespace=porch-fn-system # Namespace for function pods
- --pod-ttl=30m # How long pods live before cleanup
- --scan-interval=1m # How often to scan for expired pods
- --warm-up-pod-cache=true # Pre-deploy common function pods
To disable specific runtimes:
args:
- --disable-runtimes=exec # Disable exec runtime only
- --disable-runtimes=pod # Disable pod runtime only
- --disable-runtimes=exec,pod # Disable both runtimes
resources:
requests:
memory: "512Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1000m"
livenessProbe:
grpc:
port: 9445
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
grpc:
port: 9445
initialDelaySeconds: 5
periodSeconds: 5
Complete Function Runner deployment configuration:
apiVersion: apps/v1
kind: Deployment
metadata:
name: function-runner
namespace: porch-system
spec:
replicas: 2
selector:
matchLabels:
app: function-runner
template:
metadata:
labels:
app: function-runner
spec:
containers:
- name: function-runner
image: function-runner:latest
args:
- --port=9445
- --log-level=2
- --pod-namespace=porch-fn-system
- --pod-ttl=30m
- --scan-interval=1m
- --warm-up-pod-cache=true
- --max-request-body-size=6291456
env:
- name: WRAPPER_SERVER_IMAGE
value: "wrapper-server:latest"
ports:
- containerPort: 9445
protocol: TCP
resources:
requests:
memory: "512Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "1000m"
livenessProbe:
grpc:
port: 9445
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
grpc:
port: 9445
initialDelaySeconds: 5
periodSeconds: 5
Configure Function Runner access to private container registries