Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add progress deadline support for SDeps #4235

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6169,6 +6169,9 @@ spec:
type: object
name:
type: string
progressDeadlineSeconds:
format: int32
type: integer
replicas:
format: int32
type: integer
Expand Down Expand Up @@ -12543,6 +12546,9 @@ spec:
type: object
name:
type: string
progressDeadlineSeconds:
format: int32
type: integer
replicas:
format: int32
type: integer
Expand Down Expand Up @@ -18917,6 +18923,9 @@ spec:
type: object
name:
type: string
progressDeadlineSeconds:
format: int32
type: integer
replicas:
format: int32
type: integer
Expand Down
60 changes: 14 additions & 46 deletions helm-charts/seldon-core-operator/templates/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
{{- $cert := genSignedCert "seldon-webhook-service" nil $altNames 365 $ca -}}
---

{{- if not .Values.certManager.enabled }}
apiVersion: v1
data:
ca.crt: '{{ $ca.Cert | b64enc }}'
tls.crt: '{{ $cert.Cert | b64enc }}'
tls.key: '{{ $cert.Key | b64enc }}'
kind: Secret
metadata:
name: seldon-webhook-server-cert
namespace: '{{ include "seldon.namespace" . }}'
type: kubernetes.io/tls
{{- end }}
---

apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
Expand All @@ -43,38 +29,6 @@ webhooks:
path: /validate-machinelearning-seldon-io-v1-seldondeployment
failurePolicy: Fail
name: v1.vseldondeployment.kb.io
{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ I'm not sure how/why this no longer exists -- was I running the wrong Make commands or missing a step?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the version of your controller gen? That often tends to cause variations in the generated tokens

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's 0.7.0 -- I had to uninstall v0.4 and use the make target to install v0.7, as it created a number of small differences. The generation of this file was purely with v0.7.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok that does sound like should be ok - could you try again using make -C operator/helm create? That should use the docker image to create it so it should be the exact same output

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I did before - it's documented in this comment, near the top. I did notice it's using Docker to run some of the other commands in the Makefile

{{- if not .Values.singleNamespace }}
namespaceSelector:
matchExpressions:
- key: seldon.io/controller-id
operator: DoesNotExist
{{- if .Values.kubeflow }}
matchLabels:
serving.kubeflow.org/inferenceservice: enabled
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.singleNamespace }}
namespaceSelector:
matchLabels:
seldon.io/controller-id: {{ include "seldon.namespace" . }}
{{- end }}
{{- if not .Values.kubeflow }}
{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}
{{- if not .Values.controllerId }}
objectSelector:
matchExpressions:
- key: seldon.io/controller-id
operator: DoesNotExist
{{- end }}
{{- end }}
{{- if .Values.controllerId }}
objectSelector:
matchLabels:
seldon.io/controller-id: {{ .Values.controllerId }}
{{- end }}
{{- end }}
rules:
- apiGroups:
- machinelearning.seldon.io
Expand All @@ -86,5 +40,19 @@ webhooks:
resources:
- seldondeployments
sideEffects: None
---

{{- if not .Values.certManager.enabled }}
apiVersion: v1
data:
ca.crt: '{{ $ca.Cert | b64enc }}'
tls.crt: '{{ $cert.Cert | b64enc }}'
tls.key: '{{ $cert.Key | b64enc }}'
kind: Secret
metadata:
name: seldon-webhook-server-cert
namespace: '{{ include "seldon.namespace" . }}'
type: kubernetes.io/tls
{{- end }}

{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -235,18 +235,19 @@ type SSL struct {
}

type PredictorSpec struct {
Name string `json:"name" protobuf:"string,1,opt,name=name"`
Graph PredictiveUnit `json:"graph" protobuf:"bytes,2,opt,name=predictiveUnit"`
ComponentSpecs []*SeldonPodSpec `json:"componentSpecs,omitempty" protobuf:"bytes,3,opt,name=componentSpecs"`
Replicas *int32 `json:"replicas,omitempty" protobuf:"string,4,opt,name=replicas"`
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,5,opt,name=annotations"`
EngineResources v1.ResourceRequirements `json:"engineResources,omitempty" protobuf:"bytes,6,opt,name=engineResources"`
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,7,opt,name=labels"`
SvcOrchSpec SvcOrchSpec `json:"svcOrchSpec,omitempty" protobuf:"bytes,8,opt,name=svcOrchSpec"`
Traffic int32 `json:"traffic,omitempty" protobuf:"bytes,9,opt,name=traffic"`
Explainer *Explainer `json:"explainer,omitempty" protobuf:"bytes,10,opt,name=explainer"`
Shadow bool `json:"shadow,omitempty" protobuf:"bytes,11,opt,name=shadow"`
SSL *SSL `json:"ssl,omitempty" protobuf:"bytes,12,opt,name=ssl"`
Name string `json:"name" protobuf:"string,1,opt,name=name"`
Graph PredictiveUnit `json:"graph" protobuf:"bytes,2,opt,name=predictiveUnit"`
ComponentSpecs []*SeldonPodSpec `json:"componentSpecs,omitempty" protobuf:"bytes,3,opt,name=componentSpecs"`
Replicas *int32 `json:"replicas,omitempty" protobuf:"string,4,opt,name=replicas"`
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,5,opt,name=annotations"`
EngineResources v1.ResourceRequirements `json:"engineResources,omitempty" protobuf:"bytes,6,opt,name=engineResources"`
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,7,opt,name=labels"`
SvcOrchSpec SvcOrchSpec `json:"svcOrchSpec,omitempty" protobuf:"bytes,8,opt,name=svcOrchSpec"`
Traffic int32 `json:"traffic,omitempty" protobuf:"bytes,9,opt,name=traffic"`
Explainer *Explainer `json:"explainer,omitempty" protobuf:"bytes,10,opt,name=explainer"`
Shadow bool `json:"shadow,omitempty" protobuf:"bytes,11,opt,name=shadow"`
SSL *SSL `json:"ssl,omitempty" protobuf:"bytes,12,opt,name=ssl"`
ProgressDeadlineSeconds *int32 `json:"progressDeadlineSeconds,omitempty" protobuf:"bytes,13,opt,name=progressDeadlineSeconds"`
}

type Protocol string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10171,6 +10171,9 @@ spec:
type: object
name:
type: string
progressDeadlineSeconds:
format: int32
type: integer
replicas:
format: int32
type: integer
Expand Down Expand Up @@ -20607,6 +20610,9 @@ spec:
type: object
name:
type: string
progressDeadlineSeconds:
format: int32
type: integer
replicas:
format: int32
type: integer
Expand Down Expand Up @@ -31043,6 +31049,9 @@ spec:
type: object
name:
type: string
progressDeadlineSeconds:
format: int32
type: integer
replicas:
format: int32
type: integer
Expand Down
42 changes: 42 additions & 0 deletions operator/config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,45 @@ webhooks:
resources:
- seldondeployments
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-machinelearning-seldon-io-v1-seldondeployment
failurePolicy: Fail
name: v1.vseldondeployment.kb.io
rules:
- apiGroups:
- machinelearning.seldon.io
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- seldondeployments
sideEffects: None
- admissionReviewVersions:
- v1
- v1beta1
clientConfig:
service:
name: webhook-service
namespace: system
path: /validate-machinelearning-seldon-io-v1-seldondeployment
failurePolicy: Fail
name: v1.vseldondeployment.kb.io
rules:
- apiGroups:
- machinelearning.seldon.io
apiVersions:
- v1
operations:
- CREATE
- UPDATE
resources:
- seldondeployments
sideEffects: None
3 changes: 2 additions & 1 deletion operator/controllers/seldondeployment_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,8 @@ func createDeploymentWithoutEngine(depName string, seldonId string, seldonPodSpe
Annotations: map[string]string{},
},
},
Strategy: appsv1.DeploymentStrategy{RollingUpdate: &appsv1.RollingUpdateDeployment{MaxUnavailable: &intstr.IntOrString{StrVal: "10%"}}},
Strategy: appsv1.DeploymentStrategy{RollingUpdate: &appsv1.RollingUpdateDeployment{MaxUnavailable: &intstr.IntOrString{StrVal: "10%"}}},
ProgressDeadlineSeconds: p.ProgressDeadlineSeconds,
},
}

Expand Down