Using CRD of SeldonDeployment I want to configure HPA following this example . The seldon deployment config is -
apiVersion: machinelearning.seldon.io/v1
kind: SeldonDeployment
metadata:
name: seldon-model
spec:
name: test-deployment
predictors:
- componentSpecs:
- hpaSpec:
maxReplicas: 3
metrics:
- resource:
name: cpu
targetAverageUtilization: 10
type: Resource
minReplicas: 1
spec:
containers:
- image: seldonio/mock_classifier:1.5.0-dev
imagePullPolicy: IfNotPresent
name: classifier
resources:
requests:
cpu: '0.5'
terminationGracePeriodSeconds: 1
graph:
children: []
name: classifier
type: MODEL
name: example
When the above is applied this generates a deployment and a declarative HPA (along with other components). The deployment file is identical for QA, Alpha and Prod environments leading to the number of max / min replicas being the same. 1. Can the number of replicas be made configurable for different environments? i.e different values for max / min replicas for different envs (in the CRD SeldonDeployment config file).
Note: for other (non-Seldon) deployments, we use declarative HPA for each environment. But this is not possible in this case since the Seldon controller manager reverts any diff between the applied CRD and current (generated from the CRD) deployment.
2. More generalized question: how would we inject dynamic variables in CRD-based deployments?