From 075028006dc7aa95067cb6d2289019571abea1a6 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Mon, 2 Mar 2020 14:42:59 +0000 Subject: [PATCH 01/34] initial redhat updates to generate resources at startup --- operator/Dockerfile | 4 + operator/Makefile | 5 +- operator/config/rbac/kustomization.yaml | 2 + operator/go.mod | 1 + operator/go.sum | 1 + operator/main.go | 21 +++- operator/utils/k8s/certs.go | 110 ++++++++++++++++ operator/utils/k8s/certs_test.go | 18 +++ operator/utils/k8s/configmap.go | 48 +++++++ operator/utils/k8s/configmap_test.go | 19 +++ operator/utils/k8s/initializer.go | 119 ++++++++++++++++++ operator/utils/k8s/testdata/configmap.yaml | 15 +++ operator/utils/k8s/testdata/mutate.yaml | 91 ++++++++++++++ operator/utils/k8s/testdata/svc.yaml | 20 +++ operator/utils/k8s/webhook.go | 139 +++++++++++++++++++++ operator/utils/k8s/webhook_test.go | 36 ++++++ 16 files changed, 647 insertions(+), 2 deletions(-) create mode 100644 operator/utils/k8s/certs.go create mode 100644 operator/utils/k8s/certs_test.go create mode 100644 operator/utils/k8s/configmap.go create mode 100644 operator/utils/k8s/configmap_test.go create mode 100644 operator/utils/k8s/initializer.go create mode 100644 operator/utils/k8s/testdata/configmap.yaml create mode 100644 operator/utils/k8s/testdata/mutate.yaml create mode 100644 operator/utils/k8s/testdata/svc.yaml create mode 100644 operator/utils/k8s/webhook.go create mode 100644 operator/utils/k8s/webhook_test.go diff --git a/operator/Dockerfile b/operator/Dockerfile index 9c83b9afbc..1b5f1f87bf 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -26,4 +26,8 @@ FROM gcr.io/distroless/static:latest WORKDIR / COPY --from=builder /workspace/manager . COPY licenses/license.txt . +COPY generated/admissionregistration.k8s.io_v1beta1_mutatingwebhookconfiguration_seldon-mutating-webhook-configuration.yaml /tmp/operator-resources/mutate.yaml +COPY generated/admissionregistration.k8s.io_v1beta1_validatingwebhookconfiguration_seldon-validating-webhook-configuration.yaml /tmp/operator-resources/validate.yaml +COPY generated/~g_v1_service_seldon-webhook-service.yaml /tmp/operator-resources/service.yaml +COPY generated/~g_v1_configmap_seldon-config.yaml /tmp/operator-resources/configmap.yaml ENTRYPOINT ["/manager"] diff --git a/operator/Makefile b/operator/Makefile index 4870776680..c533eda6c3 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -19,7 +19,7 @@ all: manager # Run tests test: generate fmt vet manifests - go test ./controllers/... -coverprofile cover.out + go test ./controllers/... ./utils/... -coverprofile cover.out # Build manager binary manager: generate fmt vet @@ -157,3 +157,6 @@ clean-cert: licenses/dep.txt: go list -m all | cut -d ' ' -f 1 > licenses/dep.txt + +generate-resources: + kustomize build config/default/ -o generated diff --git a/operator/config/rbac/kustomization.yaml b/operator/config/rbac/kustomization.yaml index 3d4ec13157..acbb1e42e7 100644 --- a/operator/config/rbac/kustomization.yaml +++ b/operator/config/rbac/kustomization.yaml @@ -13,3 +13,5 @@ resources: - role_binding_sas.yaml - role_cm.yaml - role_binding_cm.yaml +- role_webhook.yaml +- role_binding_webhook.yaml diff --git a/operator/go.mod b/operator/go.mod index c174f35102..c5aff0e813 100644 --- a/operator/go.mod +++ b/operator/go.mod @@ -5,6 +5,7 @@ go 1.12 require ( github.com/Azure/go-autorest/autorest v0.9.2 // indirect github.com/Azure/go-autorest/autorest/adal v0.7.0 // indirect + github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680 github.com/go-logr/logr v0.1.0 github.com/golang/protobuf v1.3.1 // indirect github.com/google/go-cmp v0.3.1 diff --git a/operator/go.sum b/operator/go.sum index 46cdffd60f..c5c4f48ecb 100644 --- a/operator/go.sum +++ b/operator/go.sum @@ -33,6 +33,7 @@ github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680 h1:ZktWZesgun21uEDrwW7iEV1zPCGQldM2atlJZ3TdvVM= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-logr/logr v0.1.0 h1:M1Tv3VzNlEHg6uyACnRdtrploV2P7wZqH8BoQMtz0cg= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= diff --git a/operator/main.go b/operator/main.go index baf6b3f319..05a773c3d9 100644 --- a/operator/main.go +++ b/operator/main.go @@ -24,6 +24,7 @@ import ( machinelearningv1alpha2 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1alpha2" machinelearningv1alpha3 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1alpha3" "github.com/seldonio/seldon-core/operator/controllers" + k8sutils "github.com/seldonio/seldon-core/operator/utils/k8s" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" @@ -59,16 +60,34 @@ func main() { var enableLeaderElection bool var webHookPort int var namespace string + var operatorNamespace string + var createResources bool flag.StringVar(&metricsAddr, "metrics-addr", ":8080", "The address the metric endpoint binds to.") flag.BoolVar(&enableLeaderElection, "enable-leader-election", false, "Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.") flag.IntVar(&webHookPort, "webhook-port", 443, "Webhook server port") flag.StringVar(&namespace, "namespace", "", "The namespace to restrict the operator.") + flag.StringVar(&operatorNamespace, "operator-namespace", "default", "The namespace of the running operator") + flag.BoolVar(&createResources, "create-resources", false, "Create resources such as webhooks and configmaps on startup") flag.Parse() ctrl.SetLogger(zap.Logger(true)) - mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{ + config := ctrl.GetConfigOrDie() + + //Override operator namespace from environment variable as the source of truth + operatorNamespace = controllers.GetEnv("POD_NAMESPACE", operatorNamespace) + + if createResources { + setupLog.Info("Intializing operator") + err := k8sutils.InitializeOperator(config, operatorNamespace, setupLog) + if err != nil { + setupLog.Error(err, "unable to initialise operator") + os.Exit(1) + } + } + + mgr, err := ctrl.NewManager(config, ctrl.Options{ Scheme: scheme, MetricsBindAddress: metricsAddr, LeaderElection: enableLeaderElection, diff --git a/operator/utils/k8s/certs.go b/operator/utils/k8s/certs.go new file mode 100644 index 0000000000..49b9e1b97f --- /dev/null +++ b/operator/utils/k8s/certs.go @@ -0,0 +1,110 @@ +package k8s + +import ( + "bytes" + "crypto/rand" + "crypto/rsa" + "crypto/x509" + "crypto/x509/pkix" + "encoding/pem" + "math/big" + "net" + "time" +) + +type Cert struct { + caPEM string + certificatePEM string + privKeyPEM string +} + +func certSetup(hosts []string) (*Cert, error) { + // set up our CA certificate + ca := &x509.Certificate{ + SerialNumber: big.NewInt(2019), + Subject: pkix.Name{ + Organization: []string{"Seldon"}, + }, + NotBefore: time.Now(), + NotAfter: time.Now().AddDate(10, 0, 0), + IsCA: true, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, + KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, + BasicConstraintsValid: true, + } + + // create our private and public key + caPrivKey, err := rsa.GenerateKey(rand.Reader, 4096) + if err != nil { + return nil, err + } + + // create the CA + caBytes, err := x509.CreateCertificate(rand.Reader, ca, ca, &caPrivKey.PublicKey, caPrivKey) + if err != nil { + return nil, err + } + + // pem encode + caPEM := new(bytes.Buffer) + pem.Encode(caPEM, &pem.Block{ + Type: "CERTIFICATE", + Bytes: caBytes, + }) + + caPrivKeyPEM := new(bytes.Buffer) + pem.Encode(caPrivKeyPEM, &pem.Block{ + Type: "RSA PRIVATE KEY", + Bytes: x509.MarshalPKCS1PrivateKey(caPrivKey), + }) + + // set up our server certificate + cert := &x509.Certificate{ + SerialNumber: big.NewInt(2019), + Subject: pkix.Name{ + Organization: []string{"Seldon."}, + }, + NotBefore: time.Now(), + NotAfter: time.Now().AddDate(10, 0, 0), + SubjectKeyId: []byte{1, 2, 3, 4, 6}, + ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, + KeyUsage: x509.KeyUsageDigitalSignature, + } + + for _, h := range hosts { + if ip := net.ParseIP(h); ip != nil { + cert.IPAddresses = append(cert.IPAddresses, ip) + } else { + cert.DNSNames = append(cert.DNSNames, h) + } + } + + certPrivKey, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + return nil, err + } + + certBytes, err := x509.CreateCertificate(rand.Reader, cert, ca, &certPrivKey.PublicKey, caPrivKey) + if err != nil { + return nil, err + } + + certPEM := new(bytes.Buffer) + pem.Encode(certPEM, &pem.Block{ + Type: "CERTIFICATE", + Bytes: certBytes, + }) + + certPrivKeyPEM := new(bytes.Buffer) + pem.Encode(certPrivKeyPEM, &pem.Block{ + Type: "RSA PRIVATE KEY", + Bytes: x509.MarshalPKCS1PrivateKey(certPrivKey), + }) + + return &Cert{ + caPEM: caPEM.String(), + certificatePEM: certPEM.String(), + privKeyPEM: certPrivKeyPEM.String(), + }, nil + +} diff --git a/operator/utils/k8s/certs_test.go b/operator/utils/k8s/certs_test.go new file mode 100644 index 0000000000..a1181fc36c --- /dev/null +++ b/operator/utils/k8s/certs_test.go @@ -0,0 +1,18 @@ +package k8s + +import ( + . "github.com/onsi/gomega" + "testing" +) + +func TestGenerateCerts(t *testing.T) { + g := NewGomegaWithT(t) + + hosts := []string{"seldon-webhook-service.seldon-system", "seldon-webhook-service.seldon-system.svc"} + cert, err := certSetup(hosts) + g.Expect(err).To(BeNil()) + g.Expect(cert.certificatePEM[0:27]).To(Equal("-----BEGIN CERTIFICATE-----")) + g.Expect(cert.caPEM[0:27]).To(Equal("-----BEGIN CERTIFICATE-----")) + g.Expect(cert.privKeyPEM[0:31]).To(Equal("-----BEGIN RSA PRIVATE KEY-----")) + +} diff --git a/operator/utils/k8s/configmap.go b/operator/utils/k8s/configmap.go new file mode 100644 index 0000000000..0cbe656410 --- /dev/null +++ b/operator/utils/k8s/configmap.go @@ -0,0 +1,48 @@ +package k8s + +import ( + "github.com/ghodss/yaml" + "github.com/go-logr/logr" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" +) + +type ConfigmapCreator struct { + clientset kubernetes.Interface + logger logr.Logger +} + +func NewConfigmapCreator(client kubernetes.Interface, logger logr.Logger) *ConfigmapCreator { + return &ConfigmapCreator{ + clientset: client, + logger: logger, + } +} + +func (cc *ConfigmapCreator) CreateConfigmap(rawYaml []byte, namespace string) error { + cc.logger.Info("Initialise ConfigMap") + cm := corev1.ConfigMap{} + + err := yaml.Unmarshal(rawYaml, &cm) + if err != nil { + cc.logger.Info("Failed to unmarshall configmap") + return err + } + + //Set namespace + cm.Namespace = namespace + + client := cc.clientset.CoreV1().ConfigMaps(namespace) + _, err = client.Get(cm.Name, v1.GetOptions{}) + if err != nil && errors.IsNotFound(err) { + cc.logger.Info("Creating configmap") + _, err = client.Create(&cm) + } else if err == nil { + cc.logger.Info("Configmap exists will not overwrite") + } else { + cc.logger.Error(err, "Failed to get configmap") + } + return err +} diff --git a/operator/utils/k8s/configmap_test.go b/operator/utils/k8s/configmap_test.go new file mode 100644 index 0000000000..61ecc6b1fc --- /dev/null +++ b/operator/utils/k8s/configmap_test.go @@ -0,0 +1,19 @@ +package k8s + +import ( + . "github.com/onsi/gomega" + "k8s.io/client-go/kubernetes/fake" + ctrl "sigs.k8s.io/controller-runtime" + "testing" +) + +func TestConfigmapCreate(t *testing.T) { + g := NewGomegaWithT(t) + bytes, err := LoadBytesFromFile("testdata", "configmap.yaml") + g.Expect(err).To(BeNil()) + client := fake.NewSimpleClientset() + + cc := NewConfigmapCreator(client, ctrl.Log) + err = cc.CreateConfigmap(bytes, "test") + g.Expect(err).To(BeNil()) +} diff --git a/operator/utils/k8s/initializer.go b/operator/utils/k8s/initializer.go new file mode 100644 index 0000000000..6264b41a3d --- /dev/null +++ b/operator/utils/k8s/initializer.go @@ -0,0 +1,119 @@ +package k8s + +import ( + "fmt" + "github.com/go-logr/logr" + "io/ioutil" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "os" + "path/filepath" +) + +const ( + CertsFolder = "/tmp/k8s-webhook-server/serving-certs" + CertsTLSKey = "tls.key" + CertsTLSCrt = "tls.crt" + CertsTLSCa = "ca.crt" + + ResourceFolder = "/tmp/operator-resources" + MutatingWebhookFilename = "mutate.yaml" + ValidatingWebhookFilename = "validate.yaml" + ConfigMapFilename = "configmap.yaml" + ServiceFilename = "service.yaml" +) + +func LoadBytesFromFile(path string, name string) ([]byte, error) { + fullpath := filepath.Join(path, name) + return ioutil.ReadFile(fullpath) +} + +func InitializeOperator(config *rest.Config, namespace string, logger logr.Logger) error { + + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return err + } + host1 := fmt.Sprintf("seldon-webhook-service.%s", namespace) + host2 := fmt.Sprintf("seldon-webhook-service.%s.svc", namespace) + certs, err := certSetup([]string{host1, host2}) + if err != nil { + return err + } + wc, err := NewWebhookCreator(clientset, certs, logger) + if err != nil { + return err + } + + //Create/Update Mutating Webhook + bytes, err := LoadBytesFromFile(ResourceFolder, MutatingWebhookFilename) + if err != nil { + return err + } + err = wc.CreateMutatingWebhookConfigurationFromFile(bytes) + if err != nil { + return err + } + + //Create/Update Validating Webhook + bytes, err = LoadBytesFromFile(ResourceFolder, ValidatingWebhookFilename) + if err != nil { + return err + } + err = wc.CreateValidatingWebhookConfigurationFromFile(bytes) + if err != nil { + return err + } + + //Create/Update Webhook Service + bytes, err = LoadBytesFromFile(ResourceFolder, ServiceFilename) + if err != nil { + return err + } + err = wc.CreateWebhookServiceFromFile(bytes, namespace) + if err != nil { + return err + } + + //Create Configmap + cc := NewConfigmapCreator(clientset, logger) + bytes, err = LoadBytesFromFile(ResourceFolder, ConfigMapFilename) + if err != nil { + return err + } + err = cc.CreateConfigmap(bytes, namespace) + if err != nil { + return err + } + + // Create cert files + createCertFiles(certs, logger) + + return nil +} + +func createCertFiles(certs *Cert, logger logr.Logger) error { + //Save certs to filesystem + os.MkdirAll(CertsFolder, os.ModePerm) + + filename := fmt.Sprintf("%s/%s", CertsFolder, CertsTLSCa) + logger.Info("Creating ", "filename", filename) + err := ioutil.WriteFile(filename, []byte(certs.caPEM), 0600) + if err != nil { + return err + } + filename = fmt.Sprintf("%s/%s", CertsFolder, CertsTLSKey) + logger.Info("Creating ", "filename", filename) + err = ioutil.WriteFile(filename, []byte(certs.privKeyPEM), 0600) + if err != nil { + return err + } + filename = fmt.Sprintf("%s/%s", CertsFolder, CertsTLSCrt) + logger.Info("Creating ", "filename", filename) + err = ioutil.WriteFile(filename, []byte(certs.certificatePEM), 0600) + if err != nil { + return err + } + + return nil +} diff --git a/operator/utils/k8s/testdata/configmap.yaml b/operator/utils/k8s/testdata/configmap.yaml new file mode 100644 index 0000000000..4b0634099d --- /dev/null +++ b/operator/utils/k8s/testdata/configmap.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +data: + credentials: '{"gcs":{"gcsCredentialFileName":"gcloud-application-credentials.json"},"s3":{"s3AccessKeyIDName":"awsAccessKeyID","s3SecretAccessKeyName":"awsSecretAccessKey"}}' + predictor_servers: '{"MLFLOW_SERVER":{"grpc":{"defaultImageVersion":"0.2","image":"seldonio/mlflowserver_grpc"},"rest":{"defaultImageVersion":"0.2","image":"seldonio/mlflowserver_rest"}},"SKLEARN_SERVER":{"grpc":{"defaultImageVersion":"0.2","image":"seldonio/sklearnserver_grpc"},"rest":{"defaultImageVersion":"0.2","image":"seldonio/sklearnserver_rest"}},"TENSORFLOW_SERVER":{"grpc":{"defaultImageVersion":"0.7","image":"seldonio/tfserving-proxy_grpc"},"rest":{"defaultImageVersion":"0.7","image":"seldonio/tfserving-proxy_rest"},"tensorflow":true,"tfImage":"tensorflow/serving:latest"},"XGBOOST_SERVER":{"grpc":{"defaultImageVersion":"0.2","image":"seldonio/xgboostserver_grpc"},"rest":{"defaultImageVersion":"0.2","image":"seldonio/xgboostserver_rest"}}}' + storageInitializer: '{"cpuLimit":"1","cpuRequest":"100m","image":"gcr.io/kfserving/storage-initializer:0.2.2","memoryLimit":"1Gi","memoryRequest":"100Mi"}' +kind: ConfigMap +metadata: + labels: + app: seldon + app.kubernetes.io/instance: 'seldon-operator' + app.kubernetes.io/name: 'seldon-core-operator' + app.kubernetes.io/version: '1.0.3-SNAPSHOT' + control-plane: seldon-controller-manager + name: seldon-config + namespace: 'default' diff --git a/operator/utils/k8s/testdata/mutate.yaml b/operator/utils/k8s/testdata/mutate.yaml new file mode 100644 index 0000000000..4f1d8b5930 --- /dev/null +++ b/operator/utils/k8s/testdata/mutate.yaml @@ -0,0 +1,91 @@ +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: MutatingWebhookConfiguration +metadata: + annotations: + cert-manager.io/inject-ca-from: 'default/seldon-serving-cert' + creationTimestamp: null + labels: + app: seldon + app.kubernetes.io/instance: 'seldon-operator' + app.kubernetes.io/name: 'seldon-core-operator' + app.kubernetes.io/version: '1.0.3-SNAPSHOT' + name: seldon-mutating-webhook-configuration-default +webhooks: +- clientConfig: + caBundle: 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCRENDQWV5Z0F3SUJBZ0lRZDJ1eWJ1aVEzN2l0Lys0aTQ4NWQ2akFOQmdrcWhraUc5dzBCQVFzRkFEQWMKTVJvd0dBWURWUVFERXhGamRYTjBiMjB0YldWMGNtbGpjeTFqWVRBZUZ3MHlNREF5TWpreE5USXdNelJhRncweQpNVEF5TWpneE5USXdNelJhTUJ3eEdqQVlCZ05WQkFNVEVXTjFjM1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GZU53SUZoUUZvClFPSVFjNGdBTmFJdTN1Mjg0WXBEcEdHOXZwZzV6WlJ2Ky9qKzlPTi9ZdWp5Qi9qRWFqMW5KZ1lXRkEvZmFBd1QKVkRseWpETVlkeU09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K' + service: + name: seldon-webhook-service + namespace: 'default' + path: /mutate-machinelearning-seldon-io-v1-seldondeployment + failurePolicy: Fail + name: v1.mseldondeployment.kb.io + namespaceSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + rules: + - apiGroups: + - machinelearning.seldon.io + apiVersions: + - v1 + operations: + - CREATE + - UPDATE + resources: + - seldondeployments +- clientConfig: + caBundle: 'LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURCRENDQWV5Z0F3SUJBZ0lRZDJ1eWJ1aVEzN2l0Lys0aTQ4NWQ2akFOQmdrcWhraUc5dzBCQVFzRkFEQWMKTVJvd0dBWURWUVFERXhGamRYTjBiMjB0YldWMGNtbGpjeTFqWVRBZUZ3MHlNREF5TWpreE5USXdNelJhRncweQpNVEF5TWpneE5USXdNelJhTUJ3eEdqQVlCZ05WQkFNVEVXTjFjM1J2YlMxdFpYUnlhV056TFdOaE1JSUJJakFOCkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXViMHdrTnlXQjdsR3QzQkE1QTAwbGg4bFY2RFEKOEE1YUlyS2tjelV5azNQZ2c5b0Y1OFhPQlUzVDNqeDlCMU1UemloK1I0UXVFaFdvNVFlUlRDVGJRcWRlUUlrMgpnbWZRU0hxSXhVWjlFTU0vOTlpTm1YL3dpVFhyTXMyeGhralJCUWdpZG9wQk1saTJCYnN4RGg4aTNwYzZJZHVrCkFFZ0Q3eGNVU3U4em8rR3l4TTBsaWZpcC9rcWVSMFpVVnRobXA5QW5rYWJDVDY2QWlRTzJPcThZYVB6K2VZYkcKeTlqeEtINzNlTTIrQ2crYkpkNEpmemxqQmNqRVUyLzdSeVE1TzZBV3Z6YzMwR005NjhRMFExa1NZK0pOdklOUAo4UHI4L1ZQZE16aU1WWFdpK2FzT2tsN0VzZERrakFoNDcrN0NWME82YzJZeDhLMElLaUJCTlBPNWFRSURBUUFCCm8wSXdRREFPQmdOVkhROEJBZjhFQkFNQ0FxUXdIUVlEVlIwbEJCWXdGQVlJS3dZQkJRVUhBd0VHQ0NzR0FRVUYKQndNQ01BOEdBMVVkRXdFQi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFFeHpxaTFuVk1qbgowcDJCWnlRK0puSHpKdVM2cldkS0REWnp5N0treWU0SzdSR2czZ1M1d0hpYlg2WFhwU2R6WXZUWEVQVUJJTFlCCkIwV1diS0IzZXRIUVBqNStLMlphWDQ2eDhIOWFEYjFNUnJTRjBkbUlkSkFKczJQejdienBNbGgvU3hCK0VDU2QKc1VMVlVmQzUrRTUwcXRXMFJFN1duZm5BSC9MWDUwMEJ6UVJWUWYydTBRcTh5RmdPZEVrYjV2eVg3R3BRaEhjOQpXdXdjMGVLUUIrdW5oSjJPMldDaFVMRE5sWFIzVWwyVWQ0di9QQUxmNUhYRGM1L2hzcjAxemlGZU53SUZoUUZvClFPSVFjNGdBTmFJdTN1Mjg0WXBEcEdHOXZwZzV6WlJ2Ky9qKzlPTi9ZdWp5Qi9qRWFqMW5KZ1lXRkEvZmFBd1QKVkRseWpETVlkeU09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K' + service: + name: seldon-webhook-service + namespace: 'default' + path: /mutate-machinelearning-seldon-io-v1alpha2-seldondeployment + failurePolicy: Fail + name: v1alpha2.mseldondeployment.kb.io + namespaceSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + rules: + - apiGroups: + - machinelearning.seldon.io + apiVersions: + - v1alpha2 + operations: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0REWnp5N0treWU0SzdSR2czZ1M1d0hpYlg2WFhwU2R6WXZUWEVQVUJJTFlCCkIwV1diS0IzZXRIUVBqNStLMlphWDQ2eDhIOWFEYjFNUnJTRjBkbUlkSkFKczJQejdienBNbGgvU3hCK0VDU2QKc1VMVlVmQzUrRTUwcXRXMFJFN1duZm5BSC9MWDUwMEJ6UVJWUWYydTBRcTh5RmdPZEVrYjV2eVg3R3BRaEhjOQpXdXdjMGVLUUIrdW5oSjJPMldDaFVMRE5sWFIzVWwyVWQ0di9QQUxmNUhYRGM1L2hzcjAxemlGZU53SUZoUUZvClFPSVFjNGdBTmFJdTN1Mjg0WXBEcEdHOXZwZzV6WlJ2Ky9qKzlPTi9ZdWp5Qi9qRWFqMW5KZ1lXRkEvZmFBd1QKVkRseWpETVlkeU09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K' + service: + name: seldon-webhook-service + namespace: 'default' + path: /mutate-machinelearning-seldon-io-v1alpha3-seldondeployment + failurePolicy: Fail + name: v1alpha3.mseldondeployment.kb.io + namespaceSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + rules: + - apiGroups: + - machinelearning.seldon.io + apiVersions: + - v1alpha3 + operations: + - CREATE + - UPDATE + resources: + - seldondeployments diff --git a/operator/utils/k8s/testdata/svc.yaml b/operator/utils/k8s/testdata/svc.yaml new file mode 100644 index 0000000000..47c5d79247 --- /dev/null +++ b/operator/utils/k8s/testdata/svc.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-webhook-service + namespace: seldon-system +spec: + ports: + - port: 443 + targetPort: 443 + selector: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + control-plane: seldon-controller-manager diff --git a/operator/utils/k8s/webhook.go b/operator/utils/k8s/webhook.go new file mode 100644 index 0000000000..604cc8d86f --- /dev/null +++ b/operator/utils/k8s/webhook.go @@ -0,0 +1,139 @@ +package k8s + +import ( + "github.com/ghodss/yaml" + "github.com/go-logr/logr" + "k8s.io/api/admissionregistration/v1beta1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "strconv" +) + +type WebhookCreator struct { + clientset kubernetes.Interface + certs *Cert + logger logr.Logger + majorVersion int + minorVersion int +} + +func NewWebhookCreator(client kubernetes.Interface, certs *Cert, logger logr.Logger) (*WebhookCreator, error) { + serverVersion, err := client.Discovery().ServerVersion() + if err != nil { + return nil, err + } + logger.Info("Server version", "Major", serverVersion.Major, "Minor", serverVersion.Minor) + majorVersion, err := strconv.Atoi(serverVersion.Major) + if err != nil { + logger.Error(err, "Failed to parse majorVersion defaulting to 0") + majorVersion = 0 + } + minorVersion, err := strconv.Atoi(serverVersion.Minor) + if err != nil { + logger.Error(err, "Failed to parse minorVersion defaulting to 0") + minorVersion = 0 + } + return &WebhookCreator{ + clientset: client, + certs: certs, + logger: logger, + majorVersion: majorVersion, + minorVersion: minorVersion, + }, nil +} + +func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []byte) error { + mwc := v1beta1.MutatingWebhookConfiguration{} + err := yaml.Unmarshal(rawYaml, &mwc) + if err != nil { + return err + } + + for idx, _ := range mwc.Webhooks { + // add caBundle + mwc.Webhooks[idx].ClientConfig.CABundle = []byte(wc.certs.caPEM) + //Remove selector if version too low + if wc.majorVersion == 1 && wc.minorVersion < 15 { + mwc.Webhooks[idx].NamespaceSelector = nil + } + } + + // add ownership + + // create or update via client + client := wc.clientset.AdmissionregistrationV1beta1().MutatingWebhookConfigurations() + + found, err := client.Get(mwc.Name, v1.GetOptions{}) + if err != nil && errors.IsNotFound(err) { + wc.logger.Info("Creating mutating webhook") + _, err = client.Create(&mwc) + } else if err == nil { + wc.logger.Info("Updating mutating webhook") + found.Webhooks = mwc.Webhooks + _, err = client.Update(found) + return err + } + return err +} + +func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml []byte) error { + vwc := v1beta1.ValidatingWebhookConfiguration{} + err := yaml.Unmarshal(rawYaml, &vwc) + if err != nil { + return err + } + // add caBundle + for idx, _ := range vwc.Webhooks { + vwc.Webhooks[idx].ClientConfig.CABundle = []byte(wc.certs.caPEM) + } + + // add ownership + + // create or update via client + client := wc.clientset.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations() + + found, err := client.Get(vwc.Name, v1.GetOptions{}) + if err != nil && errors.IsNotFound(err) { + wc.logger.Info("Creating validating webhook") + _, err = client.Create(&vwc) + } else if err == nil { + wc.logger.Info("Updating validating webhook") + found.Webhooks = vwc.Webhooks + _, err = client.Update(found) + return err + } + return err +} + +func (wc *WebhookCreator) CreateWebhookServiceFromFile(rawYaml []byte, namespace string) error { + svcRaw := corev1.Service{} + err := yaml.Unmarshal(rawYaml, &svcRaw) + if err != nil { + return err + } + + svc := corev1.Service{} + svc.ObjectMeta = svcRaw.ObjectMeta + svc.Spec.Ports = svcRaw.Spec.Ports + svc.Spec.Selector = svcRaw.Spec.Selector + + // Ensure namespace matches required namespace + svc.Namespace = namespace + + // add ownership + + // create or update via client + client := wc.clientset.CoreV1().Services(namespace) + + _, err = client.Get(svc.Name, v1.GetOptions{}) + if err != nil && errors.IsNotFound(err) { + wc.logger.Info("Creating webhook svc") + _, err = client.Create(&svc) + } else if err == nil { + wc.logger.Info("Webhook svc exists won't update - need a patch in future") + return err + } + return err +} diff --git a/operator/utils/k8s/webhook_test.go b/operator/utils/k8s/webhook_test.go new file mode 100644 index 0000000000..044f2e6b5c --- /dev/null +++ b/operator/utils/k8s/webhook_test.go @@ -0,0 +1,36 @@ +package k8s + +import ( + . "github.com/onsi/gomega" + "k8s.io/client-go/kubernetes/fake" + ctrl "sigs.k8s.io/controller-runtime" + "testing" +) + +func TestMutatingWebhookCreate(t *testing.T) { + g := NewGomegaWithT(t) + bytes, err := LoadBytesFromFile("testdata", "mutate.yaml") + g.Expect(err).To(BeNil()) + client := fake.NewSimpleClientset() + hosts := []string{"seldon-webhook-service.seldon-system", "seldon-webhook-service.seldon-system.svc"} + certs, err := certSetup(hosts) + g.Expect(err).To(BeNil()) + wc, err := NewWebhookCreator(client, certs, ctrl.Log) + g.Expect(err).To(BeNil()) + err = wc.CreateMutatingWebhookConfigurationFromFile(bytes) + g.Expect(err).To(BeNil()) +} + +func TestWebHookSvcCreate(t *testing.T) { + g := NewGomegaWithT(t) + bytes, err := LoadBytesFromFile("testdata", "svc.yaml") + g.Expect(err).To(BeNil()) + client := fake.NewSimpleClientset() + hosts := []string{"seldon-webhook-service.seldon-system", "seldon-webhook-service.seldon-system.svc"} + certs, err := certSetup(hosts) + g.Expect(err).To(BeNil()) + wc, err := NewWebhookCreator(client, certs, ctrl.Log) + g.Expect(err).To(BeNil()) + err = wc.CreateWebhookServiceFromFile(bytes, "test") + g.Expect(err).To(BeNil()) +} From 97f634ab8d6d1b3162b3634357fbad4705c6070f Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Tue, 3 Mar 2020 18:22:31 +0000 Subject: [PATCH 02/34] update kustomize and helm with lite version --- .../clusterrole_seldon-webhook-role.yaml | 21 ++++++++++++ ...olebinding_seldon-webhook-rolebinding.yaml | 17 ++++++++++ .../templates/configmap_seldon-config.yaml | 2 ++ ...deployments.machinelearning.seldon.io.yaml | 1 + .../deployment_seldon-controller-manager.yaml | 15 ++++++--- .../service_seldon-webhook-service.yaml | 2 ++ .../templates/webhook.yaml | 3 ++ helm-charts/seldon-core-operator/values.yaml | 1 + operator/Makefile | 8 +++++ operator/config/lite/kustomization.yaml | 32 +++++++++++++++++++ .../config/lite/manager_webhook_patch.yaml | 14 ++++++++ operator/config/lite/patch_configmap.yaml | 5 +++ operator/config/lite/patch_manager_args.yaml | 15 +++++++++ operator/config/lite/patch_manager_env.yaml | 13 ++++++++ .../config/lite/role_binding_webhook.yaml | 12 +++++++ operator/config/lite/role_webhook.yaml | 16 ++++++++++ operator/config/lite/rolebinding_webhook.yaml | 17 ++++++++++ operator/config/manager/manager.yaml | 3 ++ operator/config/rbac/kustomization.yaml | 2 -- operator/helm/Makefile | 1 + operator/helm/create_templates.sh | 1 + operator/helm/split_resources.py | 17 ++++++++-- 22 files changed, 210 insertions(+), 8 deletions(-) create mode 100644 helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml create mode 100644 helm-charts/seldon-core-operator/templates/clusterrolebinding_seldon-webhook-rolebinding.yaml create mode 100644 operator/config/lite/kustomization.yaml create mode 100644 operator/config/lite/manager_webhook_patch.yaml create mode 100644 operator/config/lite/patch_configmap.yaml create mode 100644 operator/config/lite/patch_manager_args.yaml create mode 100644 operator/config/lite/patch_manager_env.yaml create mode 100644 operator/config/lite/role_binding_webhook.yaml create mode 100644 operator/config/lite/role_webhook.yaml create mode 100644 operator/config/lite/rolebinding_webhook.yaml diff --git a/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml b/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml new file mode 100644 index 0000000000..554e8dae4f --- /dev/null +++ b/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + app: seldon + app.kubernetes.io/instance: '{{ .Release.Name }}' + app.kubernetes.io/name: '{{ include "seldon.name" . }}' + app.kubernetes.io/version: '{{ .Chart.Version }}' + name: seldon-webhook-role-{{ .Release.Namespace }} +rules: +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - create + - update diff --git a/helm-charts/seldon-core-operator/templates/clusterrolebinding_seldon-webhook-rolebinding.yaml b/helm-charts/seldon-core-operator/templates/clusterrolebinding_seldon-webhook-rolebinding.yaml new file mode 100644 index 0000000000..b98942b2f3 --- /dev/null +++ b/helm-charts/seldon-core-operator/templates/clusterrolebinding_seldon-webhook-rolebinding.yaml @@ -0,0 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app: seldon + app.kubernetes.io/instance: '{{ .Release.Name }}' + app.kubernetes.io/name: '{{ include "seldon.name" . }}' + app.kubernetes.io/version: '{{ .Chart.Version }}' + name: seldon-webhook-rolebinding-{{ .Release.Namespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: seldon-webhook-role-{{ .Release.Namespace }} +subjects: +- kind: ServiceAccount + name: seldon-manager + namespace: '{{ .Release.Namespace }}' diff --git a/helm-charts/seldon-core-operator/templates/configmap_seldon-config.yaml b/helm-charts/seldon-core-operator/templates/configmap_seldon-config.yaml index a3c530df3f..b9aca6d891 100644 --- a/helm-charts/seldon-core-operator/templates/configmap_seldon-config.yaml +++ b/helm-charts/seldon-core-operator/templates/configmap_seldon-config.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.createResources }} apiVersion: v1 data: credentials: '{{ .Values.credentials | toJson }}' @@ -13,3 +14,4 @@ metadata: control-plane: seldon-controller-manager name: seldon-config namespace: '{{ .Release.Namespace }}' +{{- end }} diff --git a/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml b/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml index 609bdb6f0f..68302a0c9d 100644 --- a/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml +++ b/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml @@ -41,6 +41,7 @@ spec: type: string type: object name: + description: Name is Deprecated will be removed in future type: string oauth_key: type: string diff --git a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml index c65245076c..7808553820 100644 --- a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml +++ b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml @@ -34,10 +34,13 @@ spec: - args: - --enable-leader-election - --webhook-port={{ .Values.webhook.port }} + - --create-resources=$(CREATE_RESOURCES) - '{{- if .Values.singleNamespace }}--namespace={{ .Release.Namespace }}{{- end }}' command: - /manager env: + - name: CREATE_RESOURCES + value: '{{ .Values.createResources }}' - name: POD_NAMESPACE valueFrom: fieldRef: @@ -100,19 +103,23 @@ spec: protocol: TCP resources: limits: - cpu: {{ .Values.manager.cpuLimit }} - memory: {{ .Values.manager.memoryLimit }} + cpu: 500m + memory: 300Mi requests: - cpu: {{ .Values.manager.cpuRequest }} - memory: {{ .Values.manager.memoryRequest }} + cpu: 100m + memory: 200Mi +{{- if not .Values.createResources }} volumeMounts: - mountPath: /tmp/k8s-webhook-server/serving-certs name: cert readOnly: true +{{- end }} serviceAccountName: seldon-manager terminationGracePeriodSeconds: 10 +{{- if not .Values.createResources }} volumes: - name: cert secret: defaultMode: 420 secretName: seldon-webhook-server-cert +{{- end }} diff --git a/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml b/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml index 68f87509fa..4ff2f610cf 100644 --- a/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml +++ b/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.createResources }} apiVersion: v1 kind: Service metadata: @@ -18,3 +19,4 @@ spec: app.kubernetes.io/name: seldon app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager +{{- end }} diff --git a/helm-charts/seldon-core-operator/templates/webhook.yaml b/helm-charts/seldon-core-operator/templates/webhook.yaml index 2ccf9f8c7b..21db0efef9 100644 --- a/helm-charts/seldon-core-operator/templates/webhook.yaml +++ b/helm-charts/seldon-core-operator/templates/webhook.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.createResources }} {{- $altNames := list ( printf "seldon-webhook-service.%s" .Release.Namespace ) ( printf "seldon-webhook-service.%s.svc" .Release.Namespace ) -}} {{- $ca := genCA "custom-metrics-ca" 365 -}} {{- $cert := genSignedCert "seldon-webhook-service" nil $altNames 365 $ca -}} @@ -345,3 +346,5 @@ metadata: namespace: '{{ .Release.Namespace }}' type: kubernetes.io/tls {{- end }} + +{{- end }} diff --git a/helm-charts/seldon-core-operator/values.yaml b/helm-charts/seldon-core-operator/values.yaml index 730cd4e00a..2d1ff2c9fb 100644 --- a/helm-charts/seldon-core-operator/values.yaml +++ b/helm-charts/seldon-core-operator/values.yaml @@ -4,6 +4,7 @@ ambassador: certManager: enabled: false controllerId: '' +createResources: false crd: create: true credentials: diff --git a/operator/Makefile b/operator/Makefile index c533eda6c3..11795e6a6f 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -66,6 +66,10 @@ undeploy-controllerid: manifests cd config/manager && kustomize edit set image controller=${IMG} kustomize build config/controllerid | kubectl delete -f - +undeploy-lite: manifests + cd config/manager && kustomize edit set image controller=${IMG} + kustomize build config/lite | kubectl delete -f - + deploy-local: manifests cd config/manager && kustomize edit set image controller=${IMG} kustomize build config/local | kubectl apply -f - @@ -86,6 +90,10 @@ deploy-cert: manifests cd config/manager && kustomize edit set image controller=${IMG} kustomize build config/cert | kubectl apply -f - +deploy-lite: manifests + cd config/manager && kustomize edit set image controller=${IMG} + kustomize build config/lite | kubectl apply -f - + # Generate manifests e.g. CRD, RBAC etc. manifests: controller-gen diff --git a/operator/config/lite/kustomization.yaml b/operator/config/lite/kustomization.yaml new file mode 100644 index 0000000000..68a4d609b8 --- /dev/null +++ b/operator/config/lite/kustomization.yaml @@ -0,0 +1,32 @@ +# Adds namespace to all resources. +namespace: seldon-system + +# Value of this field is prepended to the +# names of all resources, e.g. a deployment named +# "wordpress" becomes "alices-wordpress". +# Note that it should also match with the prefix (text before '-') of the namespace +# field above. +namePrefix: seldon- + +# Labels to add to all resources and selectors. +commonLabels: + app: seldon + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + app.kubernetes.io/instance: seldon1 + +bases: +- ../crd +- ../rbac +- ../manager + +resources: +- role_webhook.yaml +- role_binding_webhook.yaml + +patchesStrategicMerge: +- patch_configmap.yaml +#- patch_manager_args.yaml +- patch_manager_env.yaml +- manager_webhook_patch.yaml + diff --git a/operator/config/lite/manager_webhook_patch.yaml b/operator/config/lite/manager_webhook_patch.yaml new file mode 100644 index 0000000000..f6aa63b84a --- /dev/null +++ b/operator/config/lite/manager_webhook_patch.yaml @@ -0,0 +1,14 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: system +spec: + template: + spec: + containers: + - name: manager + ports: + - containerPort: 443 + name: webhook-server + protocol: TCP diff --git a/operator/config/lite/patch_configmap.yaml b/operator/config/lite/patch_configmap.yaml new file mode 100644 index 0000000000..f645ab371c --- /dev/null +++ b/operator/config/lite/patch_configmap.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: config +$patch: delete diff --git a/operator/config/lite/patch_manager_args.yaml b/operator/config/lite/patch_manager_args.yaml new file mode 100644 index 0000000000..75fd8d3863 --- /dev/null +++ b/operator/config/lite/patch_manager_args.yaml @@ -0,0 +1,15 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: system +spec: + template: + spec: + containers: + - name: manager + args: + - --enable-leader-election + - --webhook-port=443 + - --create-resources + diff --git a/operator/config/lite/patch_manager_env.yaml b/operator/config/lite/patch_manager_env.yaml new file mode 100644 index 0000000000..53200862c8 --- /dev/null +++ b/operator/config/lite/patch_manager_env.yaml @@ -0,0 +1,13 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: controller-manager + namespace: system +spec: + template: + spec: + containers: + - env: + - name: CREATE_RESOURCES + value: "true" + name: manager diff --git a/operator/config/lite/role_binding_webhook.yaml b/operator/config/lite/role_binding_webhook.yaml new file mode 100644 index 0000000000..8e8b24e8d2 --- /dev/null +++ b/operator/config/lite/role_binding_webhook.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: webhook-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: webhook-role +subjects: +- kind: ServiceAccount + name: manager + namespace: system diff --git a/operator/config/lite/role_webhook.yaml b/operator/config/lite/role_webhook.yaml new file mode 100644 index 0000000000..e7d6aa1c15 --- /dev/null +++ b/operator/config/lite/role_webhook.yaml @@ -0,0 +1,16 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + name: webhook-role +rules: +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - create + - update diff --git a/operator/config/lite/rolebinding_webhook.yaml b/operator/config/lite/rolebinding_webhook.yaml new file mode 100644 index 0000000000..3112c8b154 --- /dev/null +++ b/operator/config/lite/rolebinding_webhook.yaml @@ -0,0 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-webhook-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: seldon-webhook-role +subjects: +- kind: ServiceAccount + name: seldon-manager + namespace: seldon-system diff --git a/operator/config/manager/manager.yaml b/operator/config/manager/manager.yaml index 0e39707a2d..36aed90cf1 100644 --- a/operator/config/manager/manager.yaml +++ b/operator/config/manager/manager.yaml @@ -31,7 +31,10 @@ spec: args: - --enable-leader-election - --webhook-port=443 + - --create-resources=$(CREATE_RESOURCES) env: + - name: CREATE_RESOURCES + value: "false" - name: POD_NAMESPACE valueFrom: fieldRef: diff --git a/operator/config/rbac/kustomization.yaml b/operator/config/rbac/kustomization.yaml index acbb1e42e7..3d4ec13157 100644 --- a/operator/config/rbac/kustomization.yaml +++ b/operator/config/rbac/kustomization.yaml @@ -13,5 +13,3 @@ resources: - role_binding_sas.yaml - role_cm.yaml - role_binding_cm.yaml -- role_webhook.yaml -- role_binding_webhook.yaml diff --git a/operator/helm/Makefile b/operator/helm/Makefile index 0d7d95520b..148e6bfab1 100644 --- a/operator/helm/Makefile +++ b/operator/helm/Makefile @@ -2,6 +2,7 @@ .PHONY: create create: ./create_templates.sh namespaced1 + ./create_templates.sh lite ./create_templates.sh spartakus .PHONY: clean diff --git a/operator/helm/create_templates.sh b/operator/helm/create_templates.sh index e9c3efd464..215e3c7c75 100755 --- a/operator/helm/create_templates.sh +++ b/operator/helm/create_templates.sh @@ -2,6 +2,7 @@ if [ "$#" -ne 1 ]; then echo "Illegal number of parameters" fi +rm -rf tmp mkdir tmp cd tmp kustomize build ../../config/$1 > tt.yaml diff --git a/operator/helm/split_resources.py b/operator/helm/split_resources.py index b6f6bd7f36..d3712dc6a9 100644 --- a/operator/helm/split_resources.py +++ b/operator/helm/split_resources.py @@ -22,6 +22,7 @@ HELM_VERSION_IF_START= '{{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }}\n' HELM_KUBEFLOW_IF_START='{{- if .Values.kubeflow }}\n' HELM_KUBEFLOW_IF_NOT_START='{{- if not .Values.kubeflow }}\n' +HELM_CREATERESOURCES_IF_START='{{- if not .Values.createResources }}\n' #HELM_SECRET_IF_START = '{{- if .Values.webhook.secretProvided -}}\n' HELM_IF_END = '{{- end }}\n' @@ -46,6 +47,7 @@ "EXECUTOR_PROMETHEUS_PATH": "executor.prometheus.path", "EXECUTOR_CONTAINER_USER": "executor.user", "EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME": "executor.serviceAccount.name", + "CREATE_RESOURCES": "createResources", } HELM_VALUES_IMAGE_PULL_POLICY = '{{ .Values.image.pullPolicy }}' @@ -62,7 +64,8 @@ def helm_release(value: str): if __name__ == "__main__": exp = args.prefix + "*" files = glob.glob(exp) - webhookData = '{{- $altNames := list ( printf "seldon-webhook-service.%s" .Release.Namespace ) ( printf "seldon-webhook-service.%s.svc" .Release.Namespace ) -}}\n' + webhookData = HELM_CREATERESOURCES_IF_START + webhookData = webhookData + '{{- $altNames := list ( printf "seldon-webhook-service.%s" .Release.Namespace ) ( printf "seldon-webhook-service.%s.svc" .Release.Namespace ) -}}\n' webhookData = webhookData + '{{- $ca := genCA "custom-metrics-ca" 365 -}}\n' webhookData = webhookData + '{{- $cert := genSignedCert "seldon-webhook-service" nil $altNames 365 $ca -}}\n' @@ -204,6 +207,16 @@ def helm_release(value: str): fdata = HELM_NOT_CERTMANAGER_IF_START + fdata + HELM_IF_END elif name == "seldondeployments.machinelearning.seldon.io": fdata =HELM_CRD_IF_START + fdata + HELM_IF_END + elif kind == "service" and name == "seldon-webhook-service": + fdata = HELM_CREATERESOURCES_IF_START + fdata + HELM_IF_END + elif kind == "configmap" and name == "seldon-config": + fdata = HELM_CREATERESOURCES_IF_START + fdata + HELM_IF_END + elif kind == "deployment" and name == "seldon-controller-manager": + fdata = re.sub(r"(.*volumeMounts:\n.*\n.*\n.*\n)", + HELM_CREATERESOURCES_IF_START + r"\1" + HELM_IF_END, fdata, re.M) + fdata = re.sub(r"(.*volumes:\n.*\n.*\n.*\n.*\n)", + HELM_CREATERESOURCES_IF_START + r"\1" + HELM_IF_END, fdata, re.M) + # make sure webhook is not quoted as its an int fdata = fdata.replace("'{{ .Values.webhook.port }}'","{{ .Values.webhook.port }}") @@ -225,7 +238,7 @@ def helm_release(value: str): kubeflowSelector = " matchLabels:\n serving.kubeflow.org/inferenceservice: enabled\n" webhookData = re.sub(r"(.*namespaceSelector:\n.*matchExpressions:\n.*\n.*\n)",HELM_VERSION_IF_START+HELM_NOT_SINGLE_NAMESPACE_IF_START+r"\1"+HELM_KUBEFLOW_IF_START+kubeflowSelector+HELM_IF_END+HELM_IF_END+HELM_IF_END+HELM_SINGLE_NAMESPACE_IF_START+namespaceSelector+HELM_IF_END,webhookData, re.M) webhookData = re.sub(r"(.*objectSelector:\n.*matchExpressions:\n.*\n.*\n)",HELM_KUBEFLOW_IF_NOT_START+HELM_VERSION_IF_START+HELM_NOT_CONTROLLERID_IF_START+r"\1"+HELM_IF_END+HELM_IF_END+HELM_CONTROLLERID_IF_START+objectSelector+HELM_IF_END+HELM_IF_END,webhookData, re.M) - + webhookData = webhookData + "\n" + HELM_IF_END filename = args.folder + "/" + "webhook.yaml" with open(filename, 'w') as outfile: outfile.write(webhookData) \ No newline at end of file From 67210e84de49352380e4c5920b5b6c7003016587 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Tue, 3 Mar 2020 18:28:17 +0000 Subject: [PATCH 03/34] update generated folder creation --- operator/.gitignore | 3 ++- operator/Makefile | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/operator/.gitignore b/operator/.gitignore index f1a6a0fcb6..889bd1781c 100644 --- a/operator/.gitignore +++ b/operator/.gitignore @@ -24,4 +24,5 @@ bin *~ self-signed-cert -vendor \ No newline at end of file +vendor +generated \ No newline at end of file diff --git a/operator/Makefile b/operator/Makefile index 11795e6a6f..2c6db0c435 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -116,7 +116,7 @@ create-client: test ./hack/update-codegen.sh # Build the docker image -docker-build: test +docker-build: test generate-resources docker build . -t ${IMG} # Push the docker image @@ -167,4 +167,6 @@ licenses/dep.txt: go list -m all | cut -d ' ' -f 1 > licenses/dep.txt generate-resources: + rm -rf generated + mkdir generated kustomize build config/default/ -o generated From 9d5af0f06f1a2b7a3b48cff178648fd512b5f24e Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Wed, 4 Mar 2020 07:41:48 +0000 Subject: [PATCH 04/34] Add watch namespace --- .../templates/deployment_seldon-controller-manager.yaml | 2 ++ operator/config/manager/manager.yaml | 2 ++ operator/main.go | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml index 7808553820..0e203691e3 100644 --- a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml +++ b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml @@ -39,6 +39,8 @@ spec: command: - /manager env: + - name: WATCH_NAMESPACE + value: '' - name: CREATE_RESOURCES value: '{{ .Values.createResources }}' - name: POD_NAMESPACE diff --git a/operator/config/manager/manager.yaml b/operator/config/manager/manager.yaml index 36aed90cf1..e45f416390 100644 --- a/operator/config/manager/manager.yaml +++ b/operator/config/manager/manager.yaml @@ -33,6 +33,8 @@ spec: - --webhook-port=443 - --create-resources=$(CREATE_RESOURCES) env: + - name: WATCH_NAMESPACE + value: "" - name: CREATE_RESOURCES value: "false" - name: POD_NAMESPACE diff --git a/operator/main.go b/operator/main.go index 05a773c3d9..bff05a5d84 100644 --- a/operator/main.go +++ b/operator/main.go @@ -78,6 +78,12 @@ func main() { //Override operator namespace from environment variable as the source of truth operatorNamespace = controllers.GetEnv("POD_NAMESPACE", operatorNamespace) + watchNamespace := controllers.GetEnv("WATCH_NAMESPACE", "") + if watchNamespace != "" { + setupLog.Info("Overriding namespace from WATCH_NAMESPACE", "watchNamespace", watchNamespace) + namespace = watchNamespace + } + if createResources { setupLog.Info("Intializing operator") err := k8sutils.InitializeOperator(config, operatorNamespace, setupLog) From 06e640c1a163c399a519ac799bb47e2e9cf18ac1 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Wed, 4 Mar 2020 19:22:37 +0000 Subject: [PATCH 05/34] rerun mutate on reconcile and add owner refs --- .../seldondeployment_controller.go | 12 +++ operator/main.go | 2 +- operator/utils/k8s/configmap.go | 15 +++- operator/utils/k8s/configmap_test.go | 8 +- operator/utils/k8s/initializer.go | 33 +++++-- operator/utils/k8s/webhook.go | 30 ++++++- operator/utils/k8s/webhook_test.go | 90 ++++++++++++++++++- 7 files changed, 169 insertions(+), 21 deletions(-) diff --git a/operator/controllers/seldondeployment_controller.go b/operator/controllers/seldondeployment_controller.go index 32a7657f84..6eaa237014 100644 --- a/operator/controllers/seldondeployment_controller.go +++ b/operator/controllers/seldondeployment_controller.go @@ -1347,6 +1347,18 @@ func (r *SeldonDeploymentReconciler) Reconcile(req ctrl.Request) (ctrl.Result, e return ctrl.Result{}, nil } + //rerun defaulting + before := instance.DeepCopy() + instance.Default() + if !equality.Semantic.DeepEqual(instance.Spec, before.Spec) { + diff, err := kmp.SafeDiff(instance.Spec, before.Spec) + if err != nil { + log.Error(err, "Failed to diff") + } else { + log.Info(fmt.Sprintf("Difference in seldon deployments: %v", diff)) + } + } + components, err := createComponents(r, instance, log) if err != nil { return ctrl.Result{}, err diff --git a/operator/main.go b/operator/main.go index bff05a5d84..3fcacf1840 100644 --- a/operator/main.go +++ b/operator/main.go @@ -86,7 +86,7 @@ func main() { if createResources { setupLog.Info("Intializing operator") - err := k8sutils.InitializeOperator(config, operatorNamespace, setupLog) + err := k8sutils.InitializeOperator(config, operatorNamespace, setupLog, scheme) if err != nil { setupLog.Error(err, "unable to initialise operator") os.Exit(1) diff --git a/operator/utils/k8s/configmap.go b/operator/utils/k8s/configmap.go index 0cbe656410..dd5288fa64 100644 --- a/operator/utils/k8s/configmap.go +++ b/operator/utils/k8s/configmap.go @@ -3,25 +3,30 @@ package k8s import ( "github.com/ghodss/yaml" "github.com/go-logr/logr" + appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes" + ctrl "sigs.k8s.io/controller-runtime" ) type ConfigmapCreator struct { clientset kubernetes.Interface logger logr.Logger + scheme *runtime.Scheme } -func NewConfigmapCreator(client kubernetes.Interface, logger logr.Logger) *ConfigmapCreator { +func NewConfigmapCreator(client kubernetes.Interface, logger logr.Logger, scheme *runtime.Scheme) *ConfigmapCreator { return &ConfigmapCreator{ clientset: client, logger: logger, + scheme: scheme, } } -func (cc *ConfigmapCreator) CreateConfigmap(rawYaml []byte, namespace string) error { +func (cc *ConfigmapCreator) CreateConfigmap(rawYaml []byte, namespace string, owner *appsv1.Deployment) error { cc.logger.Info("Initialise ConfigMap") cm := corev1.ConfigMap{} @@ -34,6 +39,12 @@ func (cc *ConfigmapCreator) CreateConfigmap(rawYaml []byte, namespace string) er //Set namespace cm.Namespace = namespace + // add ownership + err = ctrl.SetControllerReference(owner, &cm, cc.scheme) + if err != nil { + return err + } + client := cc.clientset.CoreV1().ConfigMaps(namespace) _, err = client.Get(cm.Name, v1.GetOptions{}) if err != nil && errors.IsNotFound(err) { diff --git a/operator/utils/k8s/configmap_test.go b/operator/utils/k8s/configmap_test.go index 61ecc6b1fc..725be580bf 100644 --- a/operator/utils/k8s/configmap_test.go +++ b/operator/utils/k8s/configmap_test.go @@ -9,11 +9,13 @@ import ( func TestConfigmapCreate(t *testing.T) { g := NewGomegaWithT(t) + scheme := createScheme() bytes, err := LoadBytesFromFile("testdata", "configmap.yaml") g.Expect(err).To(BeNil()) client := fake.NewSimpleClientset() - - cc := NewConfigmapCreator(client, ctrl.Log) - err = cc.CreateConfigmap(bytes, "test") + dep, err := createManagerDeployment(client, TestNamespace) + g.Expect(err).To(BeNil()) + cc := NewConfigmapCreator(client, ctrl.Log, scheme) + err = cc.CreateConfigmap(bytes, TestNamespace, dep) g.Expect(err).To(BeNil()) } diff --git a/operator/utils/k8s/initializer.go b/operator/utils/k8s/initializer.go index 6264b41a3d..514cea3b5c 100644 --- a/operator/utils/k8s/initializer.go +++ b/operator/utils/k8s/initializer.go @@ -4,6 +4,9 @@ import ( "fmt" "github.com/go-logr/logr" "io/ioutil" + appsv1 "k8s.io/api/apps/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" "os" @@ -21,6 +24,8 @@ const ( ValidatingWebhookFilename = "validate.yaml" ConfigMapFilename = "configmap.yaml" ServiceFilename = "service.yaml" + + ManagerDeploymentName = "seldon-controller-manager" ) func LoadBytesFromFile(path string, name string) ([]byte, error) { @@ -28,19 +33,33 @@ func LoadBytesFromFile(path string, name string) ([]byte, error) { return ioutil.ReadFile(fullpath) } -func InitializeOperator(config *rest.Config, namespace string, logger logr.Logger) error { +func findMyDeployment(clientset kubernetes.Interface, namespace string) (*appsv1.Deployment, error) { + client := clientset.AppsV1().Deployments(namespace) + return client.Get(ManagerDeploymentName, v1.GetOptions{}) +} + +func InitializeOperator(config *rest.Config, namespace string, logger logr.Logger, scheme *runtime.Scheme) error { clientset, err := kubernetes.NewForConfig(config) if err != nil { return err } + + dep, err := findMyDeployment(clientset, namespace) + if err != nil { + return err + } + + // Create certs host1 := fmt.Sprintf("seldon-webhook-service.%s", namespace) host2 := fmt.Sprintf("seldon-webhook-service.%s.svc", namespace) certs, err := certSetup([]string{host1, host2}) if err != nil { return err } - wc, err := NewWebhookCreator(clientset, certs, logger) + + // Create webhooks + wc, err := NewWebhookCreator(clientset, certs, logger, scheme) if err != nil { return err } @@ -50,7 +69,7 @@ func InitializeOperator(config *rest.Config, namespace string, logger logr.Logge if err != nil { return err } - err = wc.CreateMutatingWebhookConfigurationFromFile(bytes) + err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, namespace, dep) if err != nil { return err } @@ -60,7 +79,7 @@ func InitializeOperator(config *rest.Config, namespace string, logger logr.Logge if err != nil { return err } - err = wc.CreateValidatingWebhookConfigurationFromFile(bytes) + err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, namespace, dep) if err != nil { return err } @@ -70,18 +89,18 @@ func InitializeOperator(config *rest.Config, namespace string, logger logr.Logge if err != nil { return err } - err = wc.CreateWebhookServiceFromFile(bytes, namespace) + err = wc.CreateWebhookServiceFromFile(bytes, namespace, dep) if err != nil { return err } //Create Configmap - cc := NewConfigmapCreator(clientset, logger) + cc := NewConfigmapCreator(clientset, logger, scheme) bytes, err = LoadBytesFromFile(ResourceFolder, ConfigMapFilename) if err != nil { return err } - err = cc.CreateConfigmap(bytes, namespace) + err = cc.CreateConfigmap(bytes, namespace, dep) if err != nil { return err } diff --git a/operator/utils/k8s/webhook.go b/operator/utils/k8s/webhook.go index 604cc8d86f..a82b40cbfe 100644 --- a/operator/utils/k8s/webhook.go +++ b/operator/utils/k8s/webhook.go @@ -4,10 +4,13 @@ import ( "github.com/ghodss/yaml" "github.com/go-logr/logr" "k8s.io/api/admissionregistration/v1beta1" + appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes" + ctrl "sigs.k8s.io/controller-runtime" "strconv" ) @@ -17,9 +20,10 @@ type WebhookCreator struct { logger logr.Logger majorVersion int minorVersion int + scheme *runtime.Scheme } -func NewWebhookCreator(client kubernetes.Interface, certs *Cert, logger logr.Logger) (*WebhookCreator, error) { +func NewWebhookCreator(client kubernetes.Interface, certs *Cert, logger logr.Logger, scheme *runtime.Scheme) (*WebhookCreator, error) { serverVersion, err := client.Discovery().ServerVersion() if err != nil { return nil, err @@ -41,10 +45,11 @@ func NewWebhookCreator(client kubernetes.Interface, certs *Cert, logger logr.Log logger: logger, majorVersion: majorVersion, minorVersion: minorVersion, + scheme: scheme, }, nil } -func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []byte) error { +func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment) error { mwc := v1beta1.MutatingWebhookConfiguration{} err := yaml.Unmarshal(rawYaml, &mwc) if err != nil { @@ -54,6 +59,8 @@ func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []b for idx, _ := range mwc.Webhooks { // add caBundle mwc.Webhooks[idx].ClientConfig.CABundle = []byte(wc.certs.caPEM) + // set namespace + mwc.Webhooks[idx].ClientConfig.Service.Namespace = namespace //Remove selector if version too low if wc.majorVersion == 1 && wc.minorVersion < 15 { mwc.Webhooks[idx].NamespaceSelector = nil @@ -61,6 +68,10 @@ func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []b } // add ownership + err = ctrl.SetControllerReference(owner, &mwc, wc.scheme) + if err != nil { + return err + } // create or update via client client := wc.clientset.AdmissionregistrationV1beta1().MutatingWebhookConfigurations() @@ -78,7 +89,7 @@ func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []b return err } -func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml []byte) error { +func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment) error { vwc := v1beta1.ValidatingWebhookConfiguration{} err := yaml.Unmarshal(rawYaml, &vwc) if err != nil { @@ -87,9 +98,16 @@ func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml [ // add caBundle for idx, _ := range vwc.Webhooks { vwc.Webhooks[idx].ClientConfig.CABundle = []byte(wc.certs.caPEM) + // set namespace + vwc.Webhooks[idx].ClientConfig.Service.Namespace = namespace + } // add ownership + err = ctrl.SetControllerReference(owner, &vwc, wc.scheme) + if err != nil { + return err + } // create or update via client client := wc.clientset.AdmissionregistrationV1beta1().ValidatingWebhookConfigurations() @@ -107,7 +125,7 @@ func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml [ return err } -func (wc *WebhookCreator) CreateWebhookServiceFromFile(rawYaml []byte, namespace string) error { +func (wc *WebhookCreator) CreateWebhookServiceFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment) error { svcRaw := corev1.Service{} err := yaml.Unmarshal(rawYaml, &svcRaw) if err != nil { @@ -123,6 +141,10 @@ func (wc *WebhookCreator) CreateWebhookServiceFromFile(rawYaml []byte, namespace svc.Namespace = namespace // add ownership + err = ctrl.SetControllerReference(owner, &svc, wc.scheme) + if err != nil { + return err + } // create or update via client client := wc.clientset.CoreV1().Services(namespace) diff --git a/operator/utils/k8s/webhook_test.go b/operator/utils/k8s/webhook_test.go index 044f2e6b5c..b6780bc0eb 100644 --- a/operator/utils/k8s/webhook_test.go +++ b/operator/utils/k8s/webhook_test.go @@ -2,35 +2,117 @@ package k8s import ( . "github.com/onsi/gomega" + appsv1 "k8s.io/api/apps/v1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" + clientgoscheme "k8s.io/client-go/kubernetes/scheme" ctrl "sigs.k8s.io/controller-runtime" "testing" ) +const ( + TestNamespace = "test" +) + +func int32Ptr(i int32) *int32 { return &i } + +func createManagerDeployment(client kubernetes.Interface, namespace string) (*appsv1.Deployment, error) { + deployment := &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: ManagerDeploymentName, + }, + Spec: appsv1.DeploymentSpec{ + Replicas: int32Ptr(2), + Selector: &metav1.LabelSelector{ + MatchLabels: map[string]string{ + "app": "demo", + }, + }, + Template: v1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: map[string]string{ + "app": "demo", + }, + }, + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Name: "web", + Image: "nginx:1.12", + Ports: []v1.ContainerPort{ + { + Name: "http", + Protocol: v1.ProtocolTCP, + ContainerPort: 80, + }, + }, + }, + }, + }, + }, + }, + } + return client.AppsV1().Deployments(namespace).Create(deployment) +} + +func createScheme() *runtime.Scheme { + scheme := runtime.NewScheme() + _ = clientgoscheme.AddToScheme(scheme) + _ = appsv1.AddToScheme(scheme) + _ = v1.AddToScheme(scheme) + return scheme +} + func TestMutatingWebhookCreate(t *testing.T) { g := NewGomegaWithT(t) + scheme := createScheme() bytes, err := LoadBytesFromFile("testdata", "mutate.yaml") g.Expect(err).To(BeNil()) client := fake.NewSimpleClientset() + dep, err := createManagerDeployment(client, TestNamespace) + g.Expect(err).To(BeNil()) hosts := []string{"seldon-webhook-service.seldon-system", "seldon-webhook-service.seldon-system.svc"} certs, err := certSetup(hosts) g.Expect(err).To(BeNil()) - wc, err := NewWebhookCreator(client, certs, ctrl.Log) + wc, err := NewWebhookCreator(client, certs, ctrl.Log, scheme) g.Expect(err).To(BeNil()) - err = wc.CreateMutatingWebhookConfigurationFromFile(bytes) + err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, TestNamespace, dep) + g.Expect(err).To(BeNil()) +} + +func TestValidatingWebhookCreate(t *testing.T) { + g := NewGomegaWithT(t) + scheme := createScheme() + bytes, err := LoadBytesFromFile("testdata", "mutate.yaml") + g.Expect(err).To(BeNil()) + client := fake.NewSimpleClientset() + dep, err := createManagerDeployment(client, TestNamespace) + g.Expect(err).To(BeNil()) + hosts := []string{"seldon-webhook-service.seldon-system", "seldon-webhook-service.seldon-system.svc"} + certs, err := certSetup(hosts) + g.Expect(err).To(BeNil()) + wc, err := NewWebhookCreator(client, certs, ctrl.Log, scheme) + g.Expect(err).To(BeNil()) + err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, TestNamespace, dep) g.Expect(err).To(BeNil()) } func TestWebHookSvcCreate(t *testing.T) { g := NewGomegaWithT(t) + scheme := createScheme() bytes, err := LoadBytesFromFile("testdata", "svc.yaml") g.Expect(err).To(BeNil()) client := fake.NewSimpleClientset() + dep, err := createManagerDeployment(client, TestNamespace) + g.Expect(err).To(BeNil()) hosts := []string{"seldon-webhook-service.seldon-system", "seldon-webhook-service.seldon-system.svc"} certs, err := certSetup(hosts) g.Expect(err).To(BeNil()) - wc, err := NewWebhookCreator(client, certs, ctrl.Log) + wc, err := NewWebhookCreator(client, certs, ctrl.Log, scheme) g.Expect(err).To(BeNil()) - err = wc.CreateWebhookServiceFromFile(bytes, "test") + err = wc.CreateWebhookServiceFromFile(bytes, TestNamespace, dep) g.Expect(err).To(BeNil()) } From 4f46b7b72d5658b52043727b537f30b2f3b7e140 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Wed, 4 Mar 2020 19:28:40 +0000 Subject: [PATCH 06/34] initial open operator folder --- operator/.gitignore | 2 +- operator/seldon-operator/.gitignore | 2 + operator/seldon-operator/.osdk-scorecard.yaml | 13 + operator/seldon-operator/Makefile | 24 + ...arning.seldon.io_seldondeployment_crd.yaml | 4911 +++++++++++++++++ ...ning.seldon.io_v1_seldondeployment_cr.yaml | 20 + .../deploy/olm-catalog/csv-config.yaml | 6 + .../seldon-operator/hack/create_resources.py | 91 + 8 files changed, 5068 insertions(+), 1 deletion(-) create mode 100644 operator/seldon-operator/.gitignore create mode 100644 operator/seldon-operator/.osdk-scorecard.yaml create mode 100644 operator/seldon-operator/Makefile create mode 100644 operator/seldon-operator/deploy/crds/machinelearning.seldon.io_seldondeployment_crd.yaml create mode 100644 operator/seldon-operator/deploy/crds/machinelearning.seldon.io_v1_seldondeployment_cr.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/csv-config.yaml create mode 100644 operator/seldon-operator/hack/create_resources.py diff --git a/operator/.gitignore b/operator/.gitignore index 889bd1781c..2868a63565 100644 --- a/operator/.gitignore +++ b/operator/.gitignore @@ -25,4 +25,4 @@ bin self-signed-cert vendor -generated \ No newline at end of file +/generated/ \ No newline at end of file diff --git a/operator/seldon-operator/.gitignore b/operator/seldon-operator/.gitignore new file mode 100644 index 0000000000..eb59d5267e --- /dev/null +++ b/operator/seldon-operator/.gitignore @@ -0,0 +1,2 @@ +*~ +/generated/ \ No newline at end of file diff --git a/operator/seldon-operator/.osdk-scorecard.yaml b/operator/seldon-operator/.osdk-scorecard.yaml new file mode 100644 index 0000000000..c6c9563754 --- /dev/null +++ b/operator/seldon-operator/.osdk-scorecard.yaml @@ -0,0 +1,13 @@ +scorecard: + # Setting a global scorecard option + output: json + plugins: + - basic: + init-timeout: 60 + cr-manifest: + - "deploy/crds/machinelearning.seldon.io_v1_seldondeployment_cr.yaml" + - olm: + init-timeout: 60 + cr-manifest: + - "deploy/crds/machinelearning.seldon.io_v1_seldondeployment_cr.yaml" + csv-path: "deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml" diff --git a/operator/seldon-operator/Makefile b/operator/seldon-operator/Makefile new file mode 100644 index 0000000000..bb828797a4 --- /dev/null +++ b/operator/seldon-operator/Makefile @@ -0,0 +1,24 @@ + +generated: + rm -rf generated + mkdir generated + kustomize build ../config/lite -o generated + +deploy/operator.yaml: generated + python hack/create_resources.py --input generated --output deploy + +clean_1.0.2: + rm -f deploy/olm-catalog/seldon-operator/1.0.2/seldon-operator.v1.0.2.clusterserviceversion.yaml + +deploy/olm-catalog/seldon-operator/1.0.2/seldon-operator.v1.0.2.clusterserviceversion.yaml: + operator-sdk generate csv --csv-version 1.0.2 --from-version 0.1.5 + +.PHONY: clean_1.1.0 +clean_1.1.0: + rm -f deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml + +deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml: + operator-sdk generate csv --csv-version 1.1.0 --from-version 1.0.2 --update-crds + +scorecard: + operator-sdk scorecard -o text --bundle deploy/olm-catalog/seldon-operator --kubeconfig ~/.kube/config diff --git a/operator/seldon-operator/deploy/crds/machinelearning.seldon.io_seldondeployment_crd.yaml b/operator/seldon-operator/deploy/crds/machinelearning.seldon.io_seldondeployment_crd.yaml new file mode 100644 index 0000000000..aec7d44546 --- /dev/null +++ b/operator/seldon-operator/deploy/crds/machinelearning.seldon.io_seldondeployment_crd.yaml @@ -0,0 +1,4911 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + creationTimestamp: null + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldondeployments.machinelearning.seldon.io +spec: + group: machinelearning.seldon.io + names: + kind: SeldonDeployment + plural: seldondeployments + shortNames: + - sdep + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: SeldonDeployment is the Schema for the seldondeployments API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: SeldonDeploymentSpec defines the desired state of SeldonDeployment + properties: + annotations: + additionalProperties: + type: string + type: object + name: + description: Name is Deprecated will be removed in future + type: string + oauth_key: + type: string + oauth_secret: + type: string + predictors: + items: + properties: + annotations: + additionalProperties: + type: string + type: object + componentSpecs: + items: + properties: + hpaSpec: + properties: + maxReplicas: + format: int32 + type: integer + metrics: + items: + description: MetricSpec specifies how to scale based + on a single metric (only `type` and one other matching + field should be set at once). + properties: + external: + description: external refers to a global metric + that is not associated with any Kubernetes object. + It allows autoscaling based on information coming + from components running outside of cluster (for + example length of queue in cloud messaging service, + or QPS from loadbalancer running outside of + cluster). + properties: + metricName: + description: metricName is the name of the + metric in question. + type: string + metricSelector: + description: metricSelector is used to identify + a specific time series within a given metric. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + targetAverageValue: + description: targetAverageValue is the target + per-pod value of global metric (as a quantity). + Mutually exclusive with TargetValue. + type: string + targetValue: + description: targetValue is the target value + of the metric (as a quantity). Mutually + exclusive with TargetAverageValue. + type: string + required: + - metricName + type: object + object: + description: object refers to a metric describing + a single kubernetes object (for example, hits-per-second + on an Ingress object). + properties: + averageValue: + description: averageValue is the target value + of the average of the metric across all + relevant pods (as a quantity) + type: string + metricName: + description: metricName is the name of the + metric in question. + type: string + selector: + description: selector is the string-encoded + form of a standard kubernetes label selector + for the given metric When set, it is passed + as an additional parameter to the metrics + server for more specific metrics scoping + When unset, just the metricName will be + used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + target: + description: target is the described Kubernetes + object. + properties: + apiVersion: + description: API version of the referent + type: string + kind: + description: 'Kind of the referent; More + info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"' + type: string + name: + description: 'Name of the referent; More + info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + required: + - kind + - name + type: object + targetValue: + description: targetValue is the target value + of the metric (as a quantity). + type: string + required: + - metricName + - target + - targetValue + type: object + pods: + description: pods refers to a metric describing + each pod in the current scale target (for example, + transactions-processed-per-second). The values + will be averaged together before being compared + to the target value. + properties: + metricName: + description: metricName is the name of the + metric in question + type: string + selector: + description: selector is the string-encoded + form of a standard kubernetes label selector + for the given metric When set, it is passed + as an additional parameter to the metrics + server for more specific metrics scoping + When unset, just the metricName will be + used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + targetAverageValue: + description: targetAverageValue is the target + value of the average of the metric across + all relevant pods (as a quantity) + type: string + required: + - metricName + - targetAverageValue + type: object + resource: + description: resource refers to a resource metric + (such as those specified in requests and limits) + known to Kubernetes describing each pod in the + current scale target (e.g. CPU or memory). Such + metrics are built in to Kubernetes, and have + special scaling options on top of those available + to normal per-pod metrics using the "pods" source. + properties: + name: + description: name is the name of the resource + in question. + type: string + targetAverageUtilization: + description: targetAverageUtilization is the + target value of the average of the resource + metric across all relevant pods, represented + as a percentage of the requested value of + the resource for the pods. + format: int32 + type: integer + targetAverageValue: + description: targetAverageValue is the target + value of the average of the resource metric + across all relevant pods, as a raw value + (instead of as a percentage of the request), + similar to the "pods" metric source type. + type: string + required: + - name + type: object + type: + description: type is the type of metric source. It + should be one of "Object", "Pods" or "Resource", + each mapping to a matching field in the object. + type: string + required: + - type + type: object + type: array + minReplicas: + format: int32 + type: integer + required: + - maxReplicas + type: object + metadata: + type: object + spec: + description: PodSpec is a description of a pod. + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may + be active on the node relative to StartTime before + the system will actively try to mark it failed and + kill associated containers. Value must be a positive + integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling + rules for the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose + a node that violates one or more of the expressions. + The node that is most preferred is the one + with the greatest sum of weights, i.e. for + each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum + by iterating through the elements of this + field and adding "weight" to the sum if the + node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most + preferred. + items: + description: An empty preferred scheduling + term matches all objects with implicit weight + 0 (i.e. it's a no-op). A null preferred + scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated + with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + description: Weight associated with matching + the corresponding nodeSelectorTerm, + in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. + If the affinity requirements specified by + this field cease to be met at some point during + pod execution (e.g. due to an update), the + system may or may not try to eventually evict + the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector + terms. The terms are ORed. + items: + description: A null or empty node selector + term matches no objects. The requirements + of them are ANDed. The TopologySelectorTerm + type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + description: Describes pod affinity scheduling rules + (e.g. co-locate this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose + a node that violates one or more of the expressions. + The node that is most preferred is the one + with the greatest sum of weights, i.e. for + each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum + by iterating through the elements of this + field and adding "weight" to the sum if the + node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest + sum are the most preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added + per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity + term, associated with the corresponding + weight. + properties: + labelSelector: + description: A label query over a + set of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies + which namespaces the labelSelector + applies to (matches against); null + or empty list means "this pod's + namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where + co-located is defined as running + on a node whose value of the label + with key topologyKey matches that + of any node on which any of the + selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in + the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. + If the affinity requirements specified by + this field cease to be met at some point during + pod execution (e.g. due to a pod label update), + the system may or may not try to eventually + evict the pod from its node. When there are + multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely + those matching the labelSelector relative + to the given namespace(s)) that this pod + should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is + defined as running on a node whose value + of the label with key matches + that of any node on which a pod of the set + of pods is running + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a + set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values + array must be non-empty. If + the operator is Exists or + DoesNotExist, the values array + must be empty. This array + is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + namespaces: + description: namespaces specifies which + namespaces the labelSelector applies + to (matches against); null or empty + list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling + rules (e.g. avoid putting this pod in the same + node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the anti-affinity + expressions specified by this field, but it + may choose a node that violates one or more + of the expressions. The node that is most + preferred is the one with the greatest sum + of weights, i.e. for each node that meets + all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity + expressions, etc.), compute a sum by iterating + through the elements of this field and adding + "weight" to the sum if the node has pods which + matches the corresponding podAffinityTerm; + the node(s) with the highest sum are the most + preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added + per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity + term, associated with the corresponding + weight. + properties: + labelSelector: + description: A label query over a + set of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies + which namespaces the labelSelector + applies to (matches against); null + or empty list means "this pod's + namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where + co-located is defined as running + on a node whose value of the label + with key topologyKey matches that + of any node on which any of the + selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in + the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements + specified by this field are not met at scheduling + time, the pod will not be scheduled onto the + node. If the anti-affinity requirements specified + by this field cease to be met at some point + during pod execution (e.g. due to a pod label + update), the system may or may not try to + eventually evict the pod from its node. When + there are multiple elements, the lists of + nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely + those matching the labelSelector relative + to the given namespace(s)) that this pod + should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is + defined as running on a node whose value + of the label with key matches + that of any node on which a pod of the set + of pods is running + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a + set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values + array must be non-empty. If + the operator is Exists or + DoesNotExist, the values array + must be empty. This array + is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + namespaces: + description: namespaces specifies which + namespaces the labelSelector applies + to (matches against); null or empty + list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates + whether a service account token should be automatically + mounted. + type: boolean + containers: + description: List of containers belonging to the pod. + Containers cannot currently be added or removed. There + must be at least one container in a Pod. Cannot be + updated. + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The + docker image''s CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable + cannot be resolved, the reference in the input + string will be unchanged. The $(VAR_NAME) syntax + can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The docker image''s ENTRYPOINT is used + if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a + double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to + set in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) + are expanded using the previous defined + environment variables in the container + and any service environment variables. + If a variable cannot be resolved, the + reference in the input string will be + unchanged. The $(VAR_NAME) syntax can + be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, + regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if value + is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or it's key must be + defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + description: Specifies the output + format of the exposed resources, + defaults to "1" + type: string + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment + variables in the container. The keys defined + within a source must be a C_IDENTIFIER. All + invalid keys will be reported as an event when + the container is starting. When a key exists + in multiple sources, the value associated with + the last source will take precedence. Values + defined by an Env with a duplicate key will + take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be + a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level + config management to default or override container + images in workload controllers like Deployments + and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, + Never, IfNotPresent. Defaults to Always if :latest + tag is specified, or IfNotPresent otherwise. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately + before a container is terminated due to + an API request or management event such + as liveness probe failure, preemption, resource + contention, etc. The handler is not called + if the container crashes or exits. The reason + for termination is passed to the handler. + The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. + Regardless of the outcome of the handler, + the container will eventually terminate + within the Pod''s termination grace period. + Other management of the container blocks + until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as + a DNS_LABEL. Each container in a pod must have + a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: List of ports to expose from the + container. Exposing a port here gives the system + additional information about the network connections + a container uses, but is primarily informational. + Not specifying a port here DOES NOT prevent + that port from being exposed. Any port which + is listening on the default "0.0.0.0" address + inside a container will be accessible from the + network. Cannot be updated. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on + the pod's IP address. This must be a valid + port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: Number of port to expose on + the host. If specified, this must be a + valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be + an IANA_SVC_NAME and unique within the + pod. Each named port in a pod must have + a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be + UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum + amount of compute resources required. If + Requests is omitted for a container, it + defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls + whether a process can gain more privileges + than its parent process. This bool directly + controls if the no_new_privs flag will be + set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) + run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop + when running containers. Defaults to the + default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: procMount denotes the type of + proc mount to use for the containers. The + default is DefaultProcMount which uses the + container runtime defaults for readonly + paths and masked paths. This requires the + ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a + read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint + of the container process. Uses runtime default + if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container + must run as a non-root user. If true, the + Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 + (root) and fail to start the container if + it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint + of the container process. Defaults to user + specified in image metadata if unspecified. + May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate + a buffer for stdin in the container runtime. + If this is not set, reads from stdin in the + container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should + close the stdin channel after it has been opened + by a single attach. When stdin is true the stdin + stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until + the first client attaches to stdin, and then + remains open and accepts data until the client + disconnects, at which time stdin is closed and + remains closed until the container is restarted. + If this flag is false, a container processes + that reads from stdin will never receive an + EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file + to which the container''s termination message + will be written is mounted into the container''s + filesystem. Message written is intended to be + brief final status, such as an assertion failure + message. Will be truncated by the node if greater + than 4096 bytes. The total message length across + all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message + should be populated. File will use the contents + of terminationMessagePath to populate the container + status message on both success and failure. + FallbackToLogsOnError will use the last chunk + of container log output if the termination message + file is empty and the container exited with + an error. The log output is limited to 2048 + bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be + true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This is + a beta feature. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will + be mapped to. + type: string + name: + description: name must match the name of + a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container at + which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines + how mounts are propagated from the host + to container and the other way around. + When not set, MountPropagationNone is + used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of + a Volume. + type: string + readOnly: + description: Mounted read-only if true, + read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + subPath: + description: Path within the volume from + which the container's volume should be + mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume + from which the container's volume should + be mounted. Behaves similarly to SubPath + but environment variable references $(VAR_NAME) + are expanded using the container's environment. + Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. This + field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If + not specified, the container runtime's default + will be used, which might be configured in the + container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + dnsConfig: + description: Specifies the DNS parameters of a pod. + Parameters specified here will be merged to the generated + DNS configuration based on DNSPolicy. + properties: + nameservers: + description: A list of DNS name server IP addresses. + This will be appended to the base nameservers + generated from DNSPolicy. Duplicated nameservers + will be removed. + items: + type: string + type: array + options: + description: A list of DNS resolver options. This + will be merged with the base options generated + from DNSPolicy. Duplicated entries will be removed. + Resolution options given in Options will override + those that appear in the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver + options of a pod. + properties: + name: + description: Required. + type: string + value: + type: string + type: object + type: array + searches: + description: A list of DNS search domains for host-name + lookup. This will be appended to the base search + paths generated from DNSPolicy. Duplicated search + paths will be removed. + items: + type: string + type: array + type: object + dnsPolicy: + description: Set DNS policy for the pod. Defaults to + "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', + 'ClusterFirst', 'Default' or 'None'. DNS parameters + given in DNSConfig will be merged with the policy + selected with DNSPolicy. To have DNS options set along + with hostNetwork, you have to specify DNS policy explicitly + to 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: 'EnableServiceLinks indicates whether information + about services should be injected into pod''s environment + variables, matching the syntax of Docker links. Optional: + Defaults to true.' + type: boolean + hostAliases: + description: HostAliases is an optional list of hosts + and IPs that will be injected into the pod's hosts + file if specified. This is only valid for non-hostNetwork + pods. + items: + description: HostAlias holds the mapping between IP + and hostnames that will be injected as an entry + in the pod's hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + ip: + description: IP address of the host file entry. + type: string + type: object + type: array + hostIPC: + description: 'Use the host''s ipc namespace. Optional: + Default to false.' + type: boolean + hostNetwork: + description: Host networking requested for this pod. + Use the host's network namespace. If this option is + set, the ports that will be used must be specified. + Default to false. + type: boolean + hostPID: + description: 'Use the host''s pid namespace. Optional: + Default to false.' + type: boolean + hostname: + description: Specifies the hostname of the Pod If not + specified, the pod's hostname will be set to a system-defined + value. + type: string + imagePullSecrets: + description: 'ImagePullSecrets is an optional list of + references to secrets in the same namespace to use + for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual + puller implementations for them to use. For example, + in the case of docker, only DockerConfig type secrets + are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod' + items: + description: LocalObjectReference contains enough + information to let you locate the referenced object + inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + type: array + initContainers: + description: 'List of initialization containers belonging + to the pod. Init containers are executed in order + prior to containers being started. If any init container + fails, the pod is considered to have failed and is + handled according to its restartPolicy. The name for + an init container or normal container must be unique + among all containers. Init containers may not have + Lifecycle actions, Readiness probes, or Liveness probes. + The resourceRequirements of an init container are + taken into account during scheduling by finding the + highest request/limit for each resource type, and + then using the max of of that value or the sum of + the normal containers. Limits are applied to init + containers in a similar fashion. Init containers cannot + currently be added or removed. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The + docker image''s CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable + cannot be resolved, the reference in the input + string will be unchanged. The $(VAR_NAME) syntax + can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The docker image''s ENTRYPOINT is used + if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a + double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to + set in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) + are expanded using the previous defined + environment variables in the container + and any service environment variables. + If a variable cannot be resolved, the + reference in the input string will be + unchanged. The $(VAR_NAME) syntax can + be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, + regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if value + is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or it's key must be + defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + description: Specifies the output + format of the exposed resources, + defaults to "1" + type: string + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment + variables in the container. The keys defined + within a source must be a C_IDENTIFIER. All + invalid keys will be reported as an event when + the container is starting. When a key exists + in multiple sources, the value associated with + the last source will take precedence. Values + defined by an Env with a duplicate key will + take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be + a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level + config management to default or override container + images in workload controllers like Deployments + and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, + Never, IfNotPresent. Defaults to Always if :latest + tag is specified, or IfNotPresent otherwise. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately + before a container is terminated due to + an API request or management event such + as liveness probe failure, preemption, resource + contention, etc. The handler is not called + if the container crashes or exits. The reason + for termination is passed to the handler. + The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. + Regardless of the outcome of the handler, + the container will eventually terminate + within the Pod''s termination grace period. + Other management of the container blocks + until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as + a DNS_LABEL. Each container in a pod must have + a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: List of ports to expose from the + container. Exposing a port here gives the system + additional information about the network connections + a container uses, but is primarily informational. + Not specifying a port here DOES NOT prevent + that port from being exposed. Any port which + is listening on the default "0.0.0.0" address + inside a container will be accessible from the + network. Cannot be updated. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on + the pod's IP address. This must be a valid + port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: Number of port to expose on + the host. If specified, this must be a + valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be + an IANA_SVC_NAME and unique within the + pod. Each named port in a pod must have + a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be + UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum + amount of compute resources required. If + Requests is omitted for a container, it + defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls + whether a process can gain more privileges + than its parent process. This bool directly + controls if the no_new_privs flag will be + set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) + run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop + when running containers. Defaults to the + default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: procMount denotes the type of + proc mount to use for the containers. The + default is DefaultProcMount which uses the + container runtime defaults for readonly + paths and masked paths. This requires the + ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a + read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint + of the container process. Uses runtime default + if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container + must run as a non-root user. If true, the + Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 + (root) and fail to start the container if + it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint + of the container process. Defaults to user + specified in image metadata if unspecified. + May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate + a buffer for stdin in the container runtime. + If this is not set, reads from stdin in the + container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should + close the stdin channel after it has been opened + by a single attach. When stdin is true the stdin + stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until + the first client attaches to stdin, and then + remains open and accepts data until the client + disconnects, at which time stdin is closed and + remains closed until the container is restarted. + If this flag is false, a container processes + that reads from stdin will never receive an + EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file + to which the container''s termination message + will be written is mounted into the container''s + filesystem. Message written is intended to be + brief final status, such as an assertion failure + message. Will be truncated by the node if greater + than 4096 bytes. The total message length across + all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message + should be populated. File will use the contents + of terminationMessagePath to populate the container + status message on both success and failure. + FallbackToLogsOnError will use the last chunk + of container log output if the termination message + file is empty and the container exited with + an error. The log output is limited to 2048 + bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be + true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This is + a beta feature. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will + be mapped to. + type: string + name: + description: name must match the name of + a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container at + which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines + how mounts are propagated from the host + to container and the other way around. + When not set, MountPropagationNone is + used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of + a Volume. + type: string + readOnly: + description: Mounted read-only if true, + read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + subPath: + description: Path within the volume from + which the container's volume should be + mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume + from which the container's volume should + be mounted. Behaves similarly to SubPath + but environment variable references $(VAR_NAME) + are expanded using the container's environment. + Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. This + field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If + not specified, the container runtime's default + will be used, which might be configured in the + container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + nodeName: + description: NodeName is a request to schedule this + pod onto a specific node. If it is non-empty, the + scheduler simply schedules this pod onto that node, + assuming that it fits resource requirements. + type: string + nodeSelector: + additionalProperties: + type: string + description: 'NodeSelector is a selector which must + be true for the pod to fit on a node. Selector which + must match a node''s labels for the pod to be scheduled + on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' + type: object + priority: + description: The priority value. Various system components + use this field to find the priority of the pod. When + Priority Admission Controller is enabled, it prevents + users from setting this field. The admission controller + populates this field from PriorityClassName. The higher + the value, the higher the priority. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + "system-node-critical" and "system-cluster-critical" + are two special keywords which indicate the highest + priorities with the former being the highest priority. + Any other name must be defined by creating a PriorityClass + object with that name. If not specified, the pod priority + will be default or zero if there is no default. + type: string + readinessGates: + description: 'If specified, all readiness gates will + be evaluated for pod readiness. A pod is ready when + all its containers are ready AND all conditions specified + in the readiness gates have status equal to "True" + More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md' + items: + description: PodReadinessGate contains the reference + to a pod condition + properties: + conditionType: + description: ConditionType refers to a condition + in the pod's condition list with matching type. + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + description: 'Restart policy for all containers within + the pod. One of Always, OnFailure, Never. Default + to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' + type: string + runtimeClassName: + description: 'RuntimeClassName refers to a RuntimeClass + object in the node.k8s.io group, which should be used + to run this pod. If no RuntimeClass resource matches + the named class, the pod will not be run. If unset + or empty, the "legacy" RuntimeClass will be used, + which is an implicit class with an empty definition + that uses the default runtime handler. More info: + https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md + This is an alpha feature and may change in the future.' + type: string + schedulerName: + description: If specified, the pod will be dispatched + by specified scheduler. If not specified, the pod + will be dispatched by default scheduler. + type: string + securityContext: + description: 'SecurityContext holds pod-level security + attributes and common container settings. Optional: + Defaults to empty. See type description for default + values of each field.' + properties: + fsGroup: + description: "A special supplemental group that + applies to all containers in a pod. Some volume + types allow the Kubelet to change the ownership + of that volume to be owned by the pod: \n 1. The + owning GID will be the FSGroup 2. The setgid bit + is set (new files created in the volume will be + owned by FSGroup) 3. The permission bits are OR'd + with rw-rw---- \n If unset, the Kubelet will not + modify the ownership and permissions of any volume." + format: int64 + type: integer + runAsGroup: + description: The GID to run the entrypoint of the + container process. Uses runtime default if unset. + May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence + for that container. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run + as a non-root user. If true, the Kubelet will + validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no + such validation will be performed. May also be + set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in + SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the + container process. Defaults to user specified + in image metadata if unspecified. May also be + set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in + SecurityContext takes precedence for that container. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + all containers. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence + for that container. + properties: + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + supplementalGroups: + description: A list of groups applied to the first + process run in each container, in addition to + the container's primary GID. If unspecified, + no groups will be added to any container. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls + used for the pod. Pods with unsupported sysctls + (by the container runtime) might fail to launch. + items: + description: Sysctl defines a kernel parameter + to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + type: object + serviceAccount: + description: 'DeprecatedServiceAccount is a depreciated + alias for ServiceAccountName. Deprecated: Use serviceAccountName + instead.' + type: string + serviceAccountName: + description: 'ServiceAccountName is the name of the + ServiceAccount to use to run this pod. More info: + https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' + type: string + shareProcessNamespace: + description: 'Share a single process namespace between + all of the containers in a pod. When this is set containers + will be able to view and signal processes from other + containers in the same pod, and the first process + in each container will not be assigned PID 1. HostPID + and ShareProcessNamespace cannot both be set. Optional: + Default to false. This field is beta-level and may + be disabled with the PodShareProcessNamespace feature.' + type: boolean + subdomain: + description: If specified, the fully qualified Pod hostname + will be "...svc.". If not specified, the pod will not have + a domainname at all. + type: string + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully. May be decreased in delete + request. Value must be non-negative integer. The value + zero indicates delete immediately. If this value is + nil, the default grace period will be used instead. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than + the expected cleanup time for your process. Defaults + to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to + tolerates any taint that matches the triple + using the matching operator . + properties: + effect: + description: Effect indicates the taint effect + to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, + PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; + this combination means to match all values and + all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and + Equal. Defaults to Equal. Exists is equivalent + to wildcard for value, so that a pod can tolerate + all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the + period of time the toleration (which must be + of effect NoExecute, otherwise this field is + ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever + (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration + matches to. If the operator is Exists, the value + should be empty, otherwise just a regular string. + type: string + type: object + type: array + volumes: + description: 'List of volumes that can be mounted by + containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' + items: + type: object + type: array + required: + - containers + type: object + type: object + type: array + engineResources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + explainer: + properties: + config: + additionalProperties: + type: string + type: object + containerSpec: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The docker + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. The $(VAR_NAME) + syntax can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a + shell. The docker image''s ENTRYPOINT is used if this + is not provided. Variable references $(VAR_NAME) are + expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string + will be unchanged. The $(VAR_NAME) syntax can be escaped + with a double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the + container. Cannot be updated. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previous defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a double + $$, ie: $$(VAR_NAME). Escaped references will + never be expanded, regardless of whether the variable + exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or it's key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + description: Specifies the output format + of the exposed resources, defaults to + "1" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must + be a C_IDENTIFIER. All invalid keys will be reported + as an event when the container is starting. When a key + exists in multiple sources, the value associated with + the last source will take precedence. Values defined + by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the source of + a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret must + be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config + management to default or override container images in + workload controllers like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, + IfNotPresent. Defaults to Always if :latest tag is specified, + or IfNotPresent otherwise. Cannot be updated. More info: + https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should + take in response to container lifecycle events. Cannot + be updated. + properties: + postStart: + description: 'PostStart is called immediately after + a container is created. If the handler fails, the + container is terminated and restarted according + to its restart policy. Other management of the container + blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') + in the container's filesystem. The command + is simply exec'd, it is not run inside a + shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you + need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before + a container is terminated due to an API request + or management event such as liveness probe failure, + preemption, resource contention, etc. The handler + is not called if the container crashes or exits. + The reason for termination is passed to the handler. + The Pod''s termination grace period countdown begins + before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will + eventually terminate within the Pod''s termination + grace period. Other management of the container + blocks until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') + in the container's filesystem. The command + is simply exec'd, it is not run inside a + shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you + need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory + for the command is root ('/') in the container's + filesystem. The command is simply exec'd, it + is not run inside a shell, so traditional shell + instructions ('|', etc) won't work. To use a + shell, you need to explicitly call out to that + shell. Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the + probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. + Exposing a port here gives the system additional information + about the network connections a container uses, but + is primarily informational. Not specifying a port here + DOES NOT prevent that port from being exposed. Any port + which is listening on the default "0.0.0.0" address + inside a container will be accessible from the network. + Cannot be updated. + items: + description: ContainerPort represents a network port + in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's + IP address. This must be a valid port number, + 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port + to. + type: string + hostPort: + description: Number of port to expose on the host. + If specified, this must be a valid port number, + 0 < x < 65536. If HostNetwork is specified, this + must match ContainerPort. Most containers do not + need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in + a pod must have a unique name. Name for the port + that can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, TCP, + or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if + the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory + for the command is root ('/') in the container's + filesystem. The command is simply exec'd, it + is not run inside a shell, so traditional shell + instructions ('|', etc) won't work. To use a + shell, you need to explicitly call out to that + shell. Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the + probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. + More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as + Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the + container process. Uses runtime default if unset. + May also be set in PodSecurityContext. If set in + both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run + as a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not + run as UID 0 (root) and fail to start the container + if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the + container process. Defaults to user specified in + image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + the container. If unspecified, the container runtime + will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate a + buffer for stdin in the container runtime. If this is + not set, reads from stdin in the container will always + result in EOF. Default is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close + the stdin channel after it has been opened by a single + attach. When stdin is true the stdin stream will remain + open across multiple attach sessions. If stdinOnce is + set to true, stdin is opened on container start, is + empty until the first client attaches to stdin, and + then remains open and accepts data until the client + disconnects, at which time stdin is closed and remains + closed until the container is restarted. If this flag + is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which + the container''s termination message will be written + is mounted into the container''s filesystem. Message + written is intended to be brief final status, such as + an assertion failure message. Will be truncated by the + node if greater than 4096 bytes. The total message length + across all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should + be populated. File will use the contents of terminationMessagePath + to populate the container status message on both success + and failure. FallbackToLogsOnError will use the last + chunk of container log output if the termination message + file is empty and the container exited with an error. + The log output is limited to 2048 bytes or 80 lines, + whichever is smaller. Defaults to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a + TTY for itself, also requires 'stdin' to be true. Default + is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices + to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw + block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the + container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which + the volume should be mounted. Must not contain + ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and + the other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to + false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults + to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the + container's environment. Defaults to "" (volume's + root). SubPathExpr and SubPath are mutually exclusive. + This field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which + might be configured in the container image. Cannot be + updated. + type: string + required: + - name + type: object + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + modelUri: + type: string + serviceAccountName: + type: string + type: + type: string + type: object + graph: + properties: + children: + items: + properties: + children: + items: + properties: + children: + items: + properties: + children: + items: + properties: + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload + logging. v2alpha1 feature that is + added to v1 for backwards compatibility + while v1 is the storage version. + properties: + mode: + description: What payloads to + log + type: string + url: + description: URL to send request + logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. + v2alpha1 feature that is added to v1 for + backwards compatibility while v1 is the + storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging + CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. + v2alpha1 feature that is added to v1 for backwards + compatibility while v1 is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. v2alpha1 + feature that is added to v1 for backwards compatibility + while v1 is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. v2alpha1 feature + that is added to v1 for backwards compatibility while v1 + is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + required: + - name + - type + - value + type: object + type: array + serviceAccountName: + type: string + type: + type: string + required: + - name + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + protocol: + type: string + replicas: + format: int32 + type: integer + shadow: + type: boolean + svcOrchSpec: + properties: + env: + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previous defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in + the input string will be unchanged. The $(VAR_NAME) + syntax can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + it's key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + description: Specifies the output format of + the exposed resources, defaults to "1" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or it's + key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount of + compute resources required. If Requests is omitted for + a container, it defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined value. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + type: object + traffic: + format: int32 + type: integer + transport: + type: string + required: + - graph + - name + type: object + type: array + required: + - predictors + type: object + status: + description: SeldonDeploymentStatus defines the observed state of SeldonDeployment + properties: + deploymentStatus: + additionalProperties: + properties: + availableReplicas: + format: int32 + type: integer + description: + type: string + explainerFor: + type: string + name: + type: string + replicas: + format: int32 + type: integer + status: + type: string + type: object + type: object + description: + type: string + serviceStatus: + additionalProperties: + properties: + explainerFor: + type: string + grpcEndpoint: + type: string + httpEndpoint: + type: string + svcName: + type: string + type: object + type: object + state: + type: string + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true + - name: v1alpha2 + served: true + storage: false + - name: v1alpha3 + served: true + storage: false +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/operator/seldon-operator/deploy/crds/machinelearning.seldon.io_v1_seldondeployment_cr.yaml b/operator/seldon-operator/deploy/crds/machinelearning.seldon.io_v1_seldondeployment_cr.yaml new file mode 100644 index 0000000000..369706319b --- /dev/null +++ b/operator/seldon-operator/deploy/crds/machinelearning.seldon.io_v1_seldondeployment_cr.yaml @@ -0,0 +1,20 @@ +apiVersion: machinelearning.seldon.io/v1 +kind: SeldonDeployment +metadata: + name: seldon-model +spec: + name: test-deployment + predictors: + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier + graph: + children: [] + endpoint: + type: REST + name: classifier + type: MODEL + name: example + replicas: 1 diff --git a/operator/seldon-operator/deploy/olm-catalog/csv-config.yaml b/operator/seldon-operator/deploy/olm-catalog/csv-config.yaml new file mode 100644 index 0000000000..18e41db5ad --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/csv-config.yaml @@ -0,0 +1,6 @@ +crd-cr-paths: +- deploy/crds +operator-path: deploy/operator.yaml +role-paths: +- deploy/namespace_role.yaml +- deploy/cluster_role.yaml diff --git a/operator/seldon-operator/hack/create_resources.py b/operator/seldon-operator/hack/create_resources.py new file mode 100644 index 0000000000..d07bdad1f4 --- /dev/null +++ b/operator/seldon-operator/hack/create_resources.py @@ -0,0 +1,91 @@ +import argparse +import glob +import yaml + +parser = argparse.ArgumentParser() +parser.add_argument('--input', required=True, help='Input folder') +parser.add_argument('--output', required=True, help='Output folder') +args, _ = parser.parse_known_args() + +ROLE_FILE="namespace_role.yaml" +CLUSTERROLE_FILE="cluster_role.yaml" + +COMBINED_ROLES_FILE="role.yaml" +COMBINED_ROLES_BINDING_FILE="role_binding.yaml" + +OPERATOR_FILE="operator.yaml" +SERVICEACCOUNT_FILE="service_account.yaml" + +if __name__ == "__main__": + exp = args.input + "/*" + files = glob.glob(exp) + + roleYaml = None + clusterRoleYaml = None + clusterRoleBindingYaml = None + serviceAccountName = "seldon-manager" + + for file in files: + with open(file, 'r') as stream: + res = yaml.safe_load(stream) + kind = res["kind"].lower() + name = res["metadata"]["name"].lower() + + print("Processing ",file) + print(kind,name) + + if kind == "deployment" and name == "seldon-controller-manager": + serviceAccountName = res["spec"]["template"]["spec"]["serviceAccountName"] + res["metadata"]["namespace"] = "default" + print("Writing ",OPERATOR_FILE) + filename = args.output + "/" + OPERATOR_FILE + fdata = yaml.dump(res, width=1000) + with open(filename, 'w') as outfile: + outfile.write(fdata) + elif kind == "serviceaccount" and name == "seldon-manager": + res["metadata"]["namespace"] = "default" + print("Writing ", SERVICEACCOUNT_FILE) + filename = args.output + "/" + SERVICEACCOUNT_FILE + fdata = yaml.dump(res, width=1000) + with open(filename, 'w') as outfile: + outfile.write(fdata) + elif kind == "role": + res["metadata"]["namespace"] = "default" + if roleYaml is None: + roleYaml = res + else: + roleYaml["rules"] = roleYaml["rules"] + res["rules"] + elif kind == "clusterrole": + if clusterRoleYaml is None: + clusterRoleYaml = res + else: + clusterRoleYaml["rules"] = clusterRoleYaml["rules"] + res["rules"] + elif kind == "clusterrolebinding" and name == "seldon-manager-rolebinding": + res["roleRef"]["name"] = "seldon-manager" + res["subjects"][0]["namespace"] = "default" + filename = args.output + "/" + COMBINED_ROLES_BINDING_FILE + fdata = yaml.dump(res, width=1000) + with open(filename, 'w') as outfile: + outfile.write(fdata) + + # Write role yaml + roleYaml["metadata"]["name"] = serviceAccountName + fdata = yaml.dump(roleYaml, width=1000) + filename = args.output + "/" + ROLE_FILE + with open(filename, 'w') as outfile: + outfile.write(fdata) + + # Write clusterrole yaml + clusterRoleYaml["metadata"]["name"] = serviceAccountName + fdata = yaml.dump(clusterRoleYaml, width=1000) + filename = args.output + "/" + CLUSTERROLE_FILE + with open(filename, 'w') as outfile: + outfile.write(fdata) + + # Write combined role yaml + for rule in roleYaml["rules"]: + clusterRoleYaml["rules"].append(rule) + fdata = yaml.dump(clusterRoleYaml, width=1000) + filename = args.output + "/" + COMBINED_ROLES_FILE + with open(filename, 'w') as outfile: + outfile.write(fdata) From 8cbb065af82d36888481135a2f2fc2c0dde7e0fe Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sun, 8 Mar 2020 08:11:58 +0000 Subject: [PATCH 07/34] finish initial commit --- executor/api/rest/client_test.go | 2 +- ...elearning.seldon.io_seldondeployments.yaml | 226 +- operator/seldon-operator/Makefile | 7 + operator/seldon-operator/README.md | 4 + operator/seldon-operator/build/Dockerfile | 1 + .../seldon-operator/deploy/cluster_role.yaml | 201 + .../deploy/namespace_role.yaml | 45 + .../deploy/namespace_role_binding.yaml | 17 + ...oyments.machinelearning.seldon.io.crd.yaml | 17 + ...operator.v0.1.2.clusterserviceversion.yaml | 325 ++ ...oyments.machinelearning.seldon.io.crd.yaml | 17 + ...operator.v0.1.3.clusterserviceversion.yaml | 326 ++ ...oyments.machinelearning.seldon.io.crd.yaml | 17 + ...operator.v0.1.4.clusterserviceversion.yaml | 326 ++ ...oyments.machinelearning.seldon.io.crd.yaml | 17 + ...operator.v0.1.5.clusterserviceversion.yaml | 326 ++ ...arning.seldon.io_seldondeployment_crd.yaml | 4911 +++++++++++++++++ ...operator.v1.1.0.clusterserviceversion.yaml | 491 ++ .../seldon-operator.package.yaml | 5 + operator/seldon-operator/deploy/operator.yaml | 108 + operator/seldon-operator/deploy/role.yaml | 235 + .../seldon-operator/deploy/role_binding.yaml | 17 + .../deploy/service_account.yaml | 10 + .../seldon-operator/testing/k8s/README.md | 6 + .../testing/k8s/operator-group.yaml | 8 + .../testing/k8s/operator-source.yaml | 9 + .../testing/k8s/operator-subscription.yaml | 10 + .../testing/standalone/create_standalone.sh | 9 + .../testing/standalone/delete_standalone.sh | 9 + 29 files changed, 7654 insertions(+), 48 deletions(-) create mode 100644 operator/seldon-operator/README.md create mode 100644 operator/seldon-operator/build/Dockerfile create mode 100644 operator/seldon-operator/deploy/cluster_role.yaml create mode 100644 operator/seldon-operator/deploy/namespace_role.yaml create mode 100644 operator/seldon-operator/deploy/namespace_role_binding.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.2/seldondeployments.machinelearning.seldon.io.crd.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.2/seldonoperator.v0.1.2.clusterserviceversion.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.3/seldondeployments.machinelearning.seldon.io.crd.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.3/seldonoperator.v0.1.3.clusterserviceversion.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.4/seldondeployments.machinelearning.seldon.io.crd.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.4/seldonoperator.v0.1.4.clusterserviceversion.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.5/seldondeployments.machinelearning.seldon.io.crd.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.5/seldonoperator.v0.1.5.clusterserviceversion.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/machinelearning.seldon.io_seldondeployment_crd.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/seldon-operator.package.yaml create mode 100644 operator/seldon-operator/deploy/operator.yaml create mode 100644 operator/seldon-operator/deploy/role.yaml create mode 100644 operator/seldon-operator/deploy/role_binding.yaml create mode 100644 operator/seldon-operator/deploy/service_account.yaml create mode 100644 operator/seldon-operator/testing/k8s/README.md create mode 100644 operator/seldon-operator/testing/k8s/operator-group.yaml create mode 100644 operator/seldon-operator/testing/k8s/operator-source.yaml create mode 100644 operator/seldon-operator/testing/k8s/operator-subscription.yaml create mode 100755 operator/seldon-operator/testing/standalone/create_standalone.sh create mode 100755 operator/seldon-operator/testing/standalone/delete_standalone.sh diff --git a/executor/api/rest/client_test.go b/executor/api/rest/client_test.go index bf0f203722..d29dc1e68a 100644 --- a/executor/api/rest/client_test.go +++ b/executor/api/rest/client_test.go @@ -295,5 +295,5 @@ func TestTimeout(t *testing.T) { _, err = seldonRestClient.Status(createTestContext(), "model", host, int32(port), nil, map[string][]string{}) g.Expect(err).ToNot(BeNil()) - g.Expect(err.Error()).To(Equal(fmt.Sprintf("Get http://127.0.0.1:%d/health/status: net/http: request canceled (Client.Timeout exceeded while awaiting headers)", port))) + g.Expect(err.Error()).To(Equal(fmt.Sprintf("Get \"http://127.0.0.1:%d/health/status\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)", port))) } diff --git a/operator/config/crd/bases/machinelearning.seldon.io_seldondeployments.yaml b/operator/config/crd/bases/machinelearning.seldon.io_seldondeployments.yaml index 9a2b1b3636..0b601ea0a0 100644 --- a/operator/config/crd/bases/machinelearning.seldon.io_seldondeployments.yaml +++ b/operator/config/crd/bases/machinelearning.seldon.io_seldondeployments.yaml @@ -3,15 +3,19 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.2.5 creationTimestamp: null name: seldondeployments.machinelearning.seldon.io spec: group: machinelearning.seldon.io names: kind: SeldonDeployment + listKind: SeldonDeploymentList plural: seldondeployments shortNames: - sdep + singular: seldondeployment scope: Namespaced subresources: status: {} @@ -132,15 +136,23 @@ spec: type: object type: object targetAverageValue: + anyOf: + - type: integer + - type: string description: targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue. - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true targetValue: + anyOf: + - type: integer + - type: string description: targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue. - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true required: - metricName type: object @@ -150,10 +162,14 @@ spec: on an Ingress object). properties: averageValue: + anyOf: + - type: integer + - type: string description: averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true metricName: description: metricName is the name of the metric in question. @@ -235,9 +251,13 @@ spec: - name type: object targetValue: + anyOf: + - type: integer + - type: string description: targetValue is the target value of the metric (as a quantity). - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true required: - metricName - target @@ -312,10 +332,14 @@ spec: type: object type: object targetAverageValue: + anyOf: + - type: integer + - type: string description: targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true required: - metricName - targetAverageValue @@ -342,12 +366,16 @@ spec: format: int32 type: integer targetAverageValue: + anyOf: + - type: integer + - type: string description: targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true required: - name type: object @@ -1200,10 +1228,14 @@ spec: vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' @@ -1372,12 +1404,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -1398,12 +1431,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -1484,12 +1518,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -1510,12 +1545,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -1587,12 +1623,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -1631,12 +1668,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -1699,6 +1737,10 @@ spec: - containerPort type: object type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service @@ -1766,12 +1808,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -1810,12 +1853,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -1832,14 +1876,22 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it @@ -2335,10 +2387,14 @@ spec: vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' @@ -2507,12 +2563,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -2533,12 +2590,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -2619,12 +2677,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -2645,12 +2704,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -2722,12 +2782,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -2766,12 +2827,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -2834,6 +2896,10 @@ spec: - containerPort type: object type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service @@ -2901,12 +2967,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -2945,12 +3012,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -2967,14 +3035,22 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it @@ -3862,10 +3938,14 @@ spec: vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' @@ -3891,6 +3971,9 @@ spec: or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' type: string sizeLimit: + anyOf: + - type: integer + - type: string description: 'Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. @@ -3900,7 +3983,8 @@ spec: of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object fc: description: FC represents a Fibre Channel resource @@ -4433,11 +4517,15 @@ spec: optional for env vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' @@ -4871,13 +4959,21 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise @@ -4994,10 +5090,14 @@ spec: volumes, optional for env vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string @@ -5153,12 +5253,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -5177,12 +5278,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -5254,12 +5356,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -5278,12 +5381,13 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -5350,11 +5454,12 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -5391,11 +5496,12 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -5456,6 +5562,10 @@ spec: - containerPort type: object type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if @@ -5517,11 +5627,12 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true scheme: description: Scheme to use for connecting to the host. Defaults to HTTP. @@ -5558,11 +5669,12 @@ spec: type: string port: anyOf: - - type: string - type: integer + - type: string description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object @@ -5579,13 +5691,21 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is @@ -5980,9 +6100,13 @@ spec: optional for env vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string @@ -6021,13 +6145,21 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly diff --git a/operator/seldon-operator/Makefile b/operator/seldon-operator/Makefile index bb828797a4..4b988325e9 100644 --- a/operator/seldon-operator/Makefile +++ b/operator/seldon-operator/Makefile @@ -22,3 +22,10 @@ deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceve scorecard: operator-sdk scorecard -o text --bundle deploy/olm-catalog/seldon-operator --kubeconfig ~/.kube/config + +operator-courier_ui_validate: + operator-courier verify --ui_validate_io deploy/olm-catalog/seldon-operator + +# See https://github.com/operator-framework/community-operators/blob/master/docs/testing-operators.md +operator-courier_push: + operator-courier push deploy/olm-catalog/seldon-operator seldon seldon-operator 1.1.0 "$$QUAY_TOKEN" diff --git a/operator/seldon-operator/README.md b/operator/seldon-operator/README.md new file mode 100644 index 0000000000..d473af8365 --- /dev/null +++ b/operator/seldon-operator/README.md @@ -0,0 +1,4 @@ +# Seldon Operator for RedHat + +## Resource Generation + diff --git a/operator/seldon-operator/build/Dockerfile b/operator/seldon-operator/build/Dockerfile new file mode 100644 index 0000000000..0f5a19fae5 --- /dev/null +++ b/operator/seldon-operator/build/Dockerfile @@ -0,0 +1 @@ +# Dummy file \ No newline at end of file diff --git a/operator/seldon-operator/deploy/cluster_role.yaml b/operator/seldon-operator/deploy/cluster_role.yaml new file mode 100644 index 0000000000..e912ead5c9 --- /dev/null +++ b/operator/seldon-operator/deploy/cluster_role.yaml @@ -0,0 +1,201 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-manager +rules: +- apiGroups: + - '' + resources: + - secrets + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - configmaps + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - serviceaccounts + verbs: + - get + - list + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - create + - update +- apiGroups: + - '' + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - patch + - update +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers/status + verbs: + - get + - patch + - update +- apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/finalizers + verbs: + - get + - patch + - update +- apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/status + verbs: + - get + - patch + - update +- apiGroups: + - networking.istio.io + resources: + - destinationrules + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - networking.istio.io + resources: + - destinationrules/status + verbs: + - get + - patch + - update +- apiGroups: + - networking.istio.io + resources: + - virtualservices + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - networking.istio.io + resources: + - virtualservices/status + verbs: + - get + - patch + - update +- apiGroups: + - v1 + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - v1 + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - v1 + resources: + - services/status + verbs: + - get + - patch + - update diff --git a/operator/seldon-operator/deploy/namespace_role.yaml b/operator/seldon-operator/deploy/namespace_role.yaml new file mode 100644 index 0000000000..6ade94066b --- /dev/null +++ b/operator/seldon-operator/deploy/namespace_role.yaml @@ -0,0 +1,45 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-manager + namespace: default +rules: +- apiGroups: + - '' + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - '' + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - '' + resources: + - events + verbs: + - create +- apiGroups: + - '' + resources: + - configmaps + verbs: + - get + - list + - watch diff --git a/operator/seldon-operator/deploy/namespace_role_binding.yaml b/operator/seldon-operator/deploy/namespace_role_binding.yaml new file mode 100644 index 0000000000..6f25666c80 --- /dev/null +++ b/operator/seldon-operator/deploy/namespace_role_binding.yaml @@ -0,0 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: seldon-manager +subjects: +- kind: ServiceAccount + name: seldon-manager + namespace: default diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.2/seldondeployments.machinelearning.seldon.io.crd.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.2/seldondeployments.machinelearning.seldon.io.crd.yaml new file mode 100644 index 0000000000..7a28ddbb85 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.2/seldondeployments.machinelearning.seldon.io.crd.yaml @@ -0,0 +1,17 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: seldondeployments.machinelearning.seldon.io +spec: + group: machinelearning.seldon.io + names: + kind: SeldonDeployment + listKind: SeldonDeploymentList + plural: seldondeployments + shortNames: + - sdep + singular: seldondeployment + scope: Namespaced + subresources: + status: {} + version: v1alpha2 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.2/seldonoperator.v0.1.2.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.2/seldonoperator.v0.1.2.clusterserviceversion.yaml new file mode 100644 index 0000000000..6d1d584a75 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.2/seldonoperator.v0.1.2.clusterserviceversion.yaml @@ -0,0 +1,325 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[{"apiVersion": "machinelearning.seldon.io/v1alpha2","kind": "SeldonDeployment","metadata": + {"labels": {"app": "seldon"},"name": "seldon-model"},"spec": {"name": "test-deployment","oauth_key": + "oauth-key","oauth_secret": "oauth-secret","predictors": [{"componentSpecs": + [{"spec": {"containers": [{"image": "seldonio/mock_classifier:1.0","imagePullPolicy": + "IfNotPresent","name": "classifier","resources": {"requests": {"memory": "1Mi"}}}],"terminationGracePeriodSeconds": + 1}}],"graph": {"children": [],"name": "classifier","endpoint": {"type" : "REST"},"type": + "MODEL"},"name": "example","replicas": 1,"labels": {"version" : "v1"}}]}}]' + capabilities: Seamless Upgrades + categories: Logging & Tracing + certified: 'false' + containerImage: seldonio/seldon-core-operator:0.2.8-SNAPSHOT + createdAt: 2019-05-21 15:00:00 + description: The Seldon operator for management, monitoring and operations of + machine learning systems through the Seldon Engine. Once installed, the Seldon + Operator provides multiple functions which facilitate the productisation, monitoring + and maintenance of machine learning systems at scale. + repository: https://github.com/SeldonIO/seldon-operator + support: Clive Cox + name: seldonoperator.v0.1.2 + namespace: seldon-operator-system +spec: + customresourcedefinitions: + owned: + - description: A seldon engine deployment + displayName: Seldon Delpoyment + kind: SeldonDeployment + name: seldondeployments.machinelearning.seldon.io + version: v1alpha2 + description: "The Seldon operator enables for native operation of production machine\ + \ learning workloads, including monitoring and operations of language-agnostic\ + \ models with the benefits of real-time metrics and log analysis.\n \n## Overview\n\ + Seldon Core is an open source platform for deploying machine learning models on\ + \ a Kubernetes cluster.\n\n* Deploy machine learning models in the cloud or on-premise.\n\ + * Get metrics and ensure proper governance and compliance for your running machine\ + \ learning models.\n* Create powerful inference graphs made up of multiple components.\n\ + * Provide a consistent serving layer for models built using heterogeneous ML toolkits.\n\ + \nYou can get started by following the guides in our documentation at https://docs.seldon.io/projects/seldon-core/en/latest/workflow/README.html\n" + displayName: Seldon Operator + icon: + - base64data: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAChAegDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U6KKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiio7i4is7eWeeVIYIlLySSMFVFAySSegA70CbUVdklFeKeKv2o9E0i9Nvo+nTa2qMQ9w0vkRHgfcJVi3ORyB04yDWZp/7WlpJdot94bmtrU53SW92JXHHGFKKDz/tCvSjl2KlHmUPy/Lc+Bq8fcNUazw8sYuZO2ik1/4EouNvO9j36isnwx4q0vxjpKajpF2l5asxQsoIZGHVWU8qenB7EHoRV+9vbfTbOe7u54rW0t42lmnmcJHGijLMzHgAAEknpivPcZKXK1qfc0a1LEU41qMlKMldNO6a7plfXNcsPDOj3eq6pdx2On2kZlmuJjhUUd//AK3Uk4FfKXjH/goFZWmoXNt4Z8LtqFqjbYr+/uTF5mDyfKCk4PbLA+oHSvJv2n/2kpvi9qx0XQ5JIPCFnJmPIKNfSD/lq4PIX+6p57nBOF7j4A/sX2/jDwzF4g8cTX9it2BJZadaOsb+URw8pZSfmyCFGCAMk84H7DgeHMsyXALMOIk+aW0NdPkmm331slvqcM69SrPkofeei/C/9uTw14x1iPTPEemN4UlmZUgu2uRPbMx4/eNtUx84wSCvXLDHP0xX5j/tK/Bqy+Cfj6DSNMvbi+027skvIWu9plTLMjIxUANyhIO0cMBzgk/cn7L/AIrvfGXwN8MX+pTNcXyRSWskzZy4ileNCSep2KuT3OTXk8UZFl+HwVDNsquqVR2s76XTaavr0d7t67GuHrTlN06m6PVKKKK/MjvCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAr56/am8bTQ/YPC1uzJHKgvLplON43ERpwemVLEEdQhHSvoWvkf9paxls/idLLI+5Lq0hmjH91QCmPzRj+NexlMIzxK5ump+U+JmMr4Th2aoac8oxk/7ru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CiiimcQUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k= + mediatype: image/jpeg + install: + spec: + clusterpermissions: + - rules: + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - list + - watch + - apiGroups: + - apps + resources: + - deployments + verbs: + - list + - watch + - apiGroups: + - '' + resources: + - services + verbs: + - list + - watch + - apiGroups: + - '' + resources: + - secrets + verbs: + - list + - watch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - create + - list + - update + - watch + serviceAccountName: seldon + deployments: + - name: seldon-operator-controller-manager + spec: + selector: + matchLabels: + control-plane: controller-manager + controller-tools.k8s.io: '1.0' + serviceName: seldon-operator-controller-manager-service + template: + metadata: + annotations: + prometheus.io/scrape: 'true' + labels: + control-plane: controller-manager + controller-tools.k8s.io: '1.0' + spec: + containers: + - command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: SECRET_NAME + value: seldon-operator-webhook-server-secret + - name: AMBASSADOR_ENABLED + value: 'true' + - name: AMBASSADOR_SINGLE_NAMESPACE + value: 'false' + - name: ENGINE_CONTAINER_IMAGE_AND_VERSION + value: seldonio/engine:0.2.8-SNAPSHOT + - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + - name: PREDICTIVE_UNIT_SERVICE_PORT + value: '9000' + - name: ENGINE_SERVER_GRPC_PORT + value: '5001' + - name: ENGINE_SERVER_PORT + value: '8000' + - name: ENGINE_PROMETHEUS_PATH + value: prometheus + image: seldonio/seldon-core-operator:0.2.8-SNAPSHOT + imagePullPolicy: IfNotPresent + name: manager + ports: + - containerPort: 8080 + name: metrics + protocol: TCP + - containerPort: 9876 + name: webhook-server + protocol: TCP + resources: + requests: + cpu: 100m + memory: 20Mi + volumeMounts: + - mountPath: /tmp/cert + name: cert + readOnly: true + serviceAccountName: seldon + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + optional: true + secretName: seldon-operator-webhook-server-secret + permissions: + - rules: + - apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - update + - patch + - apiGroups: + - v1 + resources: + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - v1 + resources: + - services/status + verbs: + - get + - update + - patch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers/status + verbs: + - get + - update + - patch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/finalizers + verbs: + - get + - update + - patch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/status + verbs: + - get + - update + - patch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - '' + resources: + - secrets + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - '' + resources: + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + serviceAccountName: seldon + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - mlops + - aiops + - production + - monitoring + labels: + name: seldon-operator + links: + - name: Website + url: https://www.seldon.io/ + - name: Documentation + url: https://docs.seldon.io/projects/seldon-core/en/latest/ + - name: Seldon Operator + url: https://github.com/seldonio/seldon-operator + maintainers: + - email: hello@seldon.io + name: Seldon Technologies + maturity: alpha + minKubeVersion: 1.13.0 + provider: + name: Seldon Technologies + selector: + matchLabels: + name: seldon-operator + version: 0.1.2 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.3/seldondeployments.machinelearning.seldon.io.crd.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.3/seldondeployments.machinelearning.seldon.io.crd.yaml new file mode 100644 index 0000000000..7a28ddbb85 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.3/seldondeployments.machinelearning.seldon.io.crd.yaml @@ -0,0 +1,17 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: seldondeployments.machinelearning.seldon.io +spec: + group: machinelearning.seldon.io + names: + kind: SeldonDeployment + listKind: SeldonDeploymentList + plural: seldondeployments + shortNames: + - sdep + singular: seldondeployment + scope: Namespaced + subresources: + status: {} + version: v1alpha2 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.3/seldonoperator.v0.1.3.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.3/seldonoperator.v0.1.3.clusterserviceversion.yaml new file mode 100644 index 0000000000..c7abbd51b6 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.3/seldonoperator.v0.1.3.clusterserviceversion.yaml @@ -0,0 +1,326 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[{"apiVersion": "machinelearning.seldon.io/v1alpha2","kind": "SeldonDeployment","metadata": + {"labels": {"app": "seldon"},"name": "seldon-model"},"spec": {"name": "test-deployment","oauth_key": + "oauth-key","oauth_secret": "oauth-secret","predictors": [{"componentSpecs": + [{"spec": {"containers": [{"image": "seldonio/mock_classifier:1.0","imagePullPolicy": + "IfNotPresent","name": "classifier","resources": {"requests": {"memory": "1Mi"}}}],"terminationGracePeriodSeconds": + 1}}],"graph": {"children": [],"name": "classifier","endpoint": {"type" : "REST"},"type": + "MODEL"},"name": "example","replicas": 1,"labels": {"version" : "v1"}}]}}]' + capabilities: Seamless Upgrades + categories: Logging & Tracing + certified: 'false' + containerImage: seldonio/seldon-core-operator:0.3.1 + createdAt: 2019-05-21 15:00:00 + description: The Seldon operator for management, monitoring and operations of + machine learning systems through the Seldon Engine. Once installed, the Seldon + Operator provides multiple functions which facilitate the productisation, monitoring + and maintenance of machine learning systems at scale. + repository: https://github.com/SeldonIO/seldon-operator + support: Clive Cox + name: seldonoperator.v0.1.3 + namespace: seldon-operator-system +spec: + customresourcedefinitions: + owned: + - description: A seldon engine deployment + displayName: Seldon Delpoyment + kind: SeldonDeployment + name: seldondeployments.machinelearning.seldon.io + version: v1alpha2 + description: "The Seldon operator enables for native operation of production machine\ + \ learning workloads, including monitoring and operations of language-agnostic\ + \ models with the benefits of real-time metrics and log analysis.\n \n## Overview\n\ + Seldon Core is an open source platform for deploying machine learning models on\ + \ a Kubernetes cluster.\n\n* Deploy machine learning models in the cloud or on-premise.\n\ + * Get metrics and ensure proper governance and compliance for your running machine\ + \ learning models.\n* Create powerful inference graphs made up of multiple components.\n\ + * Provide a consistent serving layer for models built using heterogeneous ML toolkits.\n\ + \nYou can get started by following the guides in our documentation at https://docs.seldon.io/projects/seldon-core/en/latest/workflow/README.html\n" + displayName: Seldon Operator + icon: + - base64data: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAChAegDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U6KKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiio7i4is7eWeeVIYIlLySSMFVFAySSegA70CbUVdklFeKeKv2o9E0i9Nvo+nTa2qMQ9w0vkRHgfcJVi3ORyB04yDWZp/7WlpJdot94bmtrU53SW92JXHHGFKKDz/tCvSjl2KlHmUPy/Lc+Bq8fcNUazw8sYuZO2ik1/4EouNvO9j36isnwx4q0vxjpKajpF2l5asxQsoIZGHVWU8qenB7EHoRV+9vbfTbOe7u54rW0t42lmnmcJHGijLMzHgAAEknpivPcZKXK1qfc0a1LEU41qMlKMldNO6a7plfXNcsPDOj3eq6pdx2On2kZlmuJjhUUd//AK3Uk4FfKXjH/goFZWmoXNt4Z8LtqFqjbYr+/uTF5mDyfKCk4PbLA+oHSvJv2n/2kpvi9qx0XQ5JIPCFnJmPIKNfSD/lq4PIX+6p57nBOF7j4A/sX2/jDwzF4g8cTX9it2BJZadaOsb+URw8pZSfmyCFGCAMk84H7DgeHMsyXALMOIk+aW0NdPkmm331slvqcM69SrPkofeei/C/9uTw14x1iPTPEemN4UlmZUgu2uRPbMx4/eNtUx84wSCvXLDHP0xX5j/tK/Bqy+Cfj6DSNMvbi+027skvIWu9plTLMjIxUANyhIO0cMBzgk/cn7L/AIrvfGXwN8MX+pTNcXyRSWskzZy4ileNCSep2KuT3OTXk8UZFl+HwVDNsquqVR2s76XTaavr0d7t67GuHrTlN06m6PVKKKK/MjvCiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACi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jxrqEMdp4e1OVpjt+13ULxwjaOd0rgKMAdM54wATxX6Q0Vz+xVz9eo+JeY06ChUoxlUStza/e0v0aPM/gf8E9P+EOg7SY73XrpQb2+Ucevlx55CD82PJxwB6ZRRW6SSsj8sxuNxGYYieKxMuact3/XRdF0CiiimcQUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k= + mediatype: image/jpeg + install: + spec: + clusterpermissions: + - rules: + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - list + - watch + - apiGroups: + - apps + resources: + - deployments + verbs: + - list + - watch + - apiGroups: + - '' + resources: + - services + verbs: + - list + - watch + - apiGroups: + - '' + resources: + - secrets + verbs: + - list + - watch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - create + - list + - update + - watch + serviceAccountName: seldon + deployments: + - name: seldon-controller-manager + spec: + selector: + matchLabels: + control-plane: seldon-controller-manager + controller-tools.k8s.io: '1.0' + serviceName: seldon-operator-controller-manager-service + template: + metadata: + annotations: + prometheus.io/scrape: 'true' + labels: + control-plane: seldon-controller-manager + controller-tools.k8s.io: '1.0' + spec: + containers: + - command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: SECRET_NAME + value: seldon-operator-webhook-server-secret + - name: AMBASSADOR_ENABLED + value: 'true' + - name: AMBASSADOR_SINGLE_NAMESPACE + value: 'false' + - name: ENGINE_CONTAINER_IMAGE_AND_VERSION + value: seldonio/engine:0.3.1 + - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + - name: PREDICTIVE_UNIT_SERVICE_PORT + value: '9000' + - name: ENGINE_SERVER_GRPC_PORT + value: '5001' + - name: ENGINE_SERVER_PORT + value: '8000' + - name: ENGINE_PROMETHEUS_PATH + value: prometheus + image: seldonio/seldon-core-operator:0.3.1 + imagePullPolicy: IfNotPresent + name: manager + ports: + - containerPort: 8080 + name: metrics + protocol: TCP + - containerPort: 9876 + name: webhook-server + protocol: TCP + resources: + requests: + cpu: 100m + memory: 20Mi + volumeMounts: + - mountPath: /tmp/cert + name: cert + readOnly: true + serviceAccountName: seldon + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + optional: true + secretName: seldon-operator-webhook-server-secret + permissions: + - rules: + - apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - update + - patch + - apiGroups: + - v1 + resources: + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - v1 + resources: + - services/status + verbs: + - get + - update + - patch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers/status + verbs: + - get + - update + - patch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/finalizers + verbs: + - get + - update + - patch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/status + verbs: + - get + - update + - patch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - '' + resources: + - secrets + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - '' + resources: + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + serviceAccountName: seldon + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - mlops + - aiops + - production + - monitoring + labels: + name: seldon-operator + links: + - name: Website + url: https://www.seldon.io/ + - name: Documentation + url: https://docs.seldon.io/projects/seldon-core/en/latest/ + - name: Seldon Operator + url: https://github.com/seldonio/seldon-operator + maintainers: + - email: hello@seldon.io + name: Seldon Technologies + maturity: alpha + minKubeVersion: 1.13.0 + provider: + name: Seldon Technologies + replaces: seldonoperator.v0.1.2 + selector: + matchLabels: + name: seldon-operator + version: 0.1.3 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.4/seldondeployments.machinelearning.seldon.io.crd.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.4/seldondeployments.machinelearning.seldon.io.crd.yaml new file mode 100644 index 0000000000..7a28ddbb85 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.4/seldondeployments.machinelearning.seldon.io.crd.yaml @@ -0,0 +1,17 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: seldondeployments.machinelearning.seldon.io +spec: + group: machinelearning.seldon.io + names: + kind: SeldonDeployment + listKind: SeldonDeploymentList + plural: seldondeployments + shortNames: + - sdep + singular: seldondeployment + scope: Namespaced + subresources: + status: {} + version: v1alpha2 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.4/seldonoperator.v0.1.4.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.4/seldonoperator.v0.1.4.clusterserviceversion.yaml new file mode 100644 index 0000000000..21a0a86bac --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.4/seldonoperator.v0.1.4.clusterserviceversion.yaml @@ -0,0 +1,326 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[{"apiVersion": "machinelearning.seldon.io/v1alpha2","kind": "SeldonDeployment","metadata": + {"labels": {"app": "seldon"},"name": "seldon-model"},"spec": {"name": "test-deployment","oauth_key": + "oauth-key","oauth_secret": "oauth-secret","predictors": [{"componentSpecs": + [{"spec": {"containers": [{"image": "seldonio/mock_classifier:1.0","imagePullPolicy": + "IfNotPresent","name": "classifier","resources": {"requests": {"memory": "1Mi"}}}],"terminationGracePeriodSeconds": + 1}}],"graph": {"children": [],"name": "classifier","endpoint": {"type" : "REST"},"type": + "MODEL"},"name": "example","replicas": 1,"labels": {"version" : "v1"}}]}}]' + capabilities: Seamless Upgrades + categories: Logging & Tracing + certified: 'false' + containerImage: seldonio/seldon-core-operator:0.3.2-SNAPSHOT + createdAt: 2019-05-21 15:00:00 + description: The Seldon operator for management, monitoring and operations of + machine learning systems through the Seldon Engine. Once installed, the Seldon + Operator provides multiple functions which facilitate the productisation, monitoring + and maintenance of machine learning systems at scale. + repository: https://github.com/SeldonIO/seldon-operator + support: Clive Cox + name: seldonoperator.v0.1.4 + namespace: seldon-operator-system +spec: + customresourcedefinitions: + owned: + - description: A seldon engine deployment + displayName: Seldon Delpoyment + kind: SeldonDeployment + name: seldondeployments.machinelearning.seldon.io + version: v1alpha2 + description: "The Seldon operator enables for native operation of production machine\ + \ learning workloads, including monitoring and operations of language-agnostic\ + \ models with the benefits of real-time metrics and log analysis.\n \n## Overview\n\ + Seldon Core is an open source platform for deploying machine learning models on\ + \ a Kubernetes cluster.\n\n* Deploy machine learning models in the cloud or on-premise.\n\ + * Get metrics and ensure proper governance and compliance for your running machine\ + \ learning models.\n* Create powerful inference graphs made up of multiple components.\n\ + * Provide a consistent serving layer for models built using heterogeneous ML toolkits.\n\ + \nYou can get started by following the guides in our documentation at https://docs.seldon.io/projects/seldon-core/en/latest/workflow/README.html\n" + displayName: Seldon Operator + icon: + - base64data: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAChAegDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U6KKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiio7i4is7eWeeVIYIlLySSMFVFAySSegA70CbUVdklFeKeKv2o9E0i9Nvo+nTa2qMQ9w0vkRHgfcJVi3ORyB04yDWZp/7WlpJdot94bmtrU53SW92JXHHGFKKDz/tCvSjl2KlHmUPy/Lc+Bq8fcNUazw8sYuZO2ik1/4EouNvO9j36isnwx4q0vxjpKajpF2l5asxQsoIZGHVWU8qenB7EHoRV+9vbfTbOe7u54rW0t42lmnmcJHGijLMzHgAAEknpivPcZKXK1qfc0a1LEU41qMlKMldNO6a7plfXNcsPDOj3eq6pdx2On2kZlmuJjhUUd//AK3Uk4FfKXjH/goFZWmoXNt4Z8LtqFqjbYr+/uTF5mDyfKCk4PbLA+oHSvJv2n/2kpvi9qx0XQ5JIPCFnJmPIKNfSD/lq4PIX+6p57nBOF7j4A/sX2/jDwzF4g8cTX9it2BJZadaOsb+URw8pZSfmyCFGCAMk84H7DgeHMsyXALMOIk+aW0NdPkmm331slvqcM69SrPkofeei/C/9uTw14x1iPTPEemN4UlmZUgu2uRPbMx4/eNtUx84wSCvXLDHP0xX5j/tK/Bqy+Cfj6DSNMvbi+027skvIWu9plTLMjIxUANyhIO0cMBzgk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MbeFTgbAY1wzhpOoLkEivoKiigAooooAKKKKACiiigAooooAKKKKACiiigAqnq+lWuvaTe6bfRedZXkL288e4rvjdSrDIIIyCeRzVyigqMpQkpRdmj4E+Jn7Nfi7wNrDpp+m3XiHSZGJt7rT4WmcLzxIiglWAxzjaex6gcz4f+EfjjxrqEMdp4e1OVpjt+13ULxwjaOd0rgKMAdM54wATxX6Q0Vz+xVz9eo+JeY06ChUoxlUStza/e0v0aPM/gf8E9P+EOg7SY73XrpQb2+Ucevlx55CD82PJxwB6ZRRW6SSsj8sxuNxGYYieKxMuact3/XRdF0CiiimcQUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k= + mediatype: image/jpeg + install: + spec: + clusterpermissions: + - rules: + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - list + - watch + - apiGroups: + - apps + resources: + - deployments + verbs: + - list + - watch + - apiGroups: + - '' + resources: + - services + verbs: + - list + - watch + - apiGroups: + - '' + resources: + - secrets + verbs: + - list + - watch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - create + - list + - update + - watch + serviceAccountName: seldon + deployments: + - name: seldon-controller-manager + spec: + selector: + matchLabels: + control-plane: seldon-controller-manager + controller-tools.k8s.io: '1.0' + serviceName: seldon-operator-controller-manager-service + template: + metadata: + annotations: + prometheus.io/scrape: 'true' + labels: + control-plane: seldon-controller-manager + controller-tools.k8s.io: '1.0' + spec: + containers: + - command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: SECRET_NAME + value: seldon-operator-webhook-server-secret + - name: AMBASSADOR_ENABLED + value: 'true' + - name: AMBASSADOR_SINGLE_NAMESPACE + value: 'false' + - name: ENGINE_CONTAINER_IMAGE_AND_VERSION + value: seldonio/engine:0.3.1 + - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + - name: PREDICTIVE_UNIT_SERVICE_PORT + value: '9000' + - name: ENGINE_SERVER_GRPC_PORT + value: '5001' + - name: ENGINE_SERVER_PORT + value: '8000' + - name: ENGINE_PROMETHEUS_PATH + value: prometheus + image: seldonio/seldon-core-operator:0.3.2-SNAPSHOT + imagePullPolicy: IfNotPresent + name: manager + ports: + - containerPort: 8080 + name: metrics + protocol: TCP + - containerPort: 9876 + name: webhook-server + protocol: TCP + resources: + requests: + cpu: 100m + memory: 20Mi + volumeMounts: + - mountPath: /tmp/cert + name: cert + readOnly: true + serviceAccountName: seldon + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + optional: true + secretName: seldon-operator-webhook-server-secret + permissions: + - rules: + - apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - update + - patch + - apiGroups: + - v1 + resources: + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - v1 + resources: + - services/status + verbs: + - get + - update + - patch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers/status + verbs: + - get + - update + - patch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/finalizers + verbs: + - get + - update + - patch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/status + verbs: + - get + - update + - patch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - '' + resources: + - secrets + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - '' + resources: + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + serviceAccountName: seldon + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - mlops + - aiops + - production + - monitoring + labels: + name: seldon-operator + links: + - name: Website + url: https://www.seldon.io/ + - name: Documentation + url: https://docs.seldon.io/projects/seldon-core/en/latest/ + - name: Seldon Operator + url: https://github.com/seldonio/seldon-operator + maintainers: + - email: hello@seldon.io + name: Seldon Technologies + maturity: alpha + minKubeVersion: 1.13.0 + provider: + name: Seldon Technologies + replaces: seldonoperator.v0.1.3 + selector: + matchLabels: + name: seldon-operator + version: 0.1.4 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.5/seldondeployments.machinelearning.seldon.io.crd.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.5/seldondeployments.machinelearning.seldon.io.crd.yaml new file mode 100644 index 0000000000..7a28ddbb85 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.5/seldondeployments.machinelearning.seldon.io.crd.yaml @@ -0,0 +1,17 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + name: seldondeployments.machinelearning.seldon.io +spec: + group: machinelearning.seldon.io + names: + kind: SeldonDeployment + listKind: SeldonDeploymentList + plural: seldondeployments + shortNames: + - sdep + singular: seldondeployment + scope: Namespaced + subresources: + status: {} + version: v1alpha2 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.5/seldonoperator.v0.1.5.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.5/seldonoperator.v0.1.5.clusterserviceversion.yaml new file mode 100644 index 0000000000..238c29e7df --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/0.1.5/seldonoperator.v0.1.5.clusterserviceversion.yaml @@ -0,0 +1,326 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: '[{"apiVersion": "machinelearning.seldon.io/v1alpha2","kind": "SeldonDeployment","metadata": + {"labels": {"app": "seldon"},"name": "seldon-model"},"spec": {"name": "test-deployment","oauth_key": + "oauth-key","oauth_secret": "oauth-secret","predictors": [{"componentSpecs": + [{"spec": {"containers": [{"image": "seldonio/mock_classifier:1.0","imagePullPolicy": + "IfNotPresent","name": "classifier","resources": {"requests": {"memory": "1Mi"}}}],"terminationGracePeriodSeconds": + 1}}],"graph": {"children": [],"name": "classifier","endpoint": {"type" : "REST"},"type": + "MODEL"},"name": "example","replicas": 1,"labels": {"version" : "v1"}}]}}]' + capabilities: Seamless Upgrades + categories: Logging & Tracing + certified: 'false' + containerImage: seldonio/seldon-core-operator:0.4.0 + createdAt: 2019-05-21 15:00:00 + description: The Seldon operator for management, monitoring and operations of + machine learning systems through the Seldon Engine. Once installed, the Seldon + Operator provides multiple functions which facilitate the productisation, monitoring + and maintenance of machine learning systems at scale. + repository: https://github.com/SeldonIO/seldon-operator + support: Clive Cox + name: seldonoperator.v0.1.5 + namespace: seldon-operator-system +spec: + customresourcedefinitions: + owned: + - description: A seldon engine deployment + displayName: Seldon Delpoyment + kind: SeldonDeployment + name: seldondeployments.machinelearning.seldon.io + version: v1alpha2 + description: "The Seldon operator enables for native operation of production machine\ + \ learning workloads, including monitoring and operations of language-agnostic\ + \ models with the benefits of real-time metrics and log analysis.\n \n## Overview\n\ + Seldon Core is an open source platform for deploying machine learning models on\ + \ a Kubernetes cluster.\n\n* Deploy machine learning models in the cloud or on-premise.\n\ + * Get metrics and ensure proper governance and compliance for your running machine\ + \ learning models.\n* Create powerful inference graphs made up of multiple components.\n\ + * Provide a consistent serving layer for models built using heterogeneous ML toolkits.\n\ + \nYou can get started by following the guides in our documentation at https://docs.seldon.io/projects/seldon-core/en/latest/workflow/README.html\n" + displayName: Seldon Operator + icon: + - base64data: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAChAegDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U6KKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiio7i4is7eWeeVIYIlLySSMFVFAySSegA70CbUVdklFeKeKv2o9E0i9Nvo+nTa2qMQ9w0vkRHgfcJVi3ORyB04yDWZp/7WlpJdot94bmtrU53SW92JXHHGFKKDz/tCvSjl2KlHmUPy/Lc+Bq8fcNUazw8sYuZO2ik1/4EouNvO9j36isnwx4q0vxjpKajpF2l5asxQsoIZGHVWU8qenB7EHoRV+9vbfTbOe7u54rW0t42lmnmcJHGijLMzHgAAEknpivPcZKXK1qfc0a1LEU41qMlKMldNO6a7plfXNcsPDOj3eq6pdx2On2kZlmuJjhUUd//AK3Uk4FfKXjH/goFZWmoXNt4Z8LtqFqjbYr+/uTF5mDyfKCk4PbLA+oHSvJv2n/2kpvi9qx0XQ5JIPCFnJmPIKNfSD/lq4PIX+6p57nBOF7j4A/sX2/jDwzF4g8cTX9it2BJZadaOsb+UR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UUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k= + mediatype: image/jpeg + install: + spec: + clusterpermissions: + - rules: + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - list + - watch + - apiGroups: + - apps + resources: + - deployments + verbs: + - list + - watch + - apiGroups: + - '' + resources: + - services + verbs: + - list + - watch + - apiGroups: + - '' + resources: + - secrets + verbs: + - list + - watch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - create + - list + - update + - watch + serviceAccountName: seldon + deployments: + - name: seldon-controller-manager + spec: + selector: + matchLabels: + control-plane: seldon-controller-manager + controller-tools.k8s.io: '1.0' + serviceName: seldon-operator-controller-manager-service + template: + metadata: + annotations: + prometheus.io/scrape: 'true' + labels: + control-plane: seldon-controller-manager + controller-tools.k8s.io: '1.0' + spec: + containers: + - command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: SECRET_NAME + value: seldon-operator-webhook-server-secret + - name: AMBASSADOR_ENABLED + value: 'true' + - name: AMBASSADOR_SINGLE_NAMESPACE + value: 'false' + - name: ENGINE_CONTAINER_IMAGE_AND_VERSION + value: seldonio/engine:0.4.0 + - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + - name: PREDICTIVE_UNIT_SERVICE_PORT + value: '9000' + - name: ENGINE_SERVER_GRPC_PORT + value: '5001' + - name: ENGINE_SERVER_PORT + value: '8000' + - name: ENGINE_PROMETHEUS_PATH + value: prometheus + image: seldonio/seldon-core-operator:0.4.0 + imagePullPolicy: IfNotPresent + name: manager + ports: + - containerPort: 8080 + name: metrics + protocol: TCP + - containerPort: 9876 + name: webhook-server + protocol: TCP + resources: + requests: + cpu: 100m + memory: 20Mi + volumeMounts: + - mountPath: /tmp/cert + name: cert + readOnly: true + serviceAccountName: seldon + terminationGracePeriodSeconds: 10 + volumes: + - name: cert + secret: + defaultMode: 420 + optional: true + secretName: seldon-operator-webhook-server-secret + permissions: + - rules: + - apiGroups: + - apps + resources: + - deployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - update + - patch + - apiGroups: + - v1 + resources: + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - v1 + resources: + - services/status + verbs: + - get + - update + - patch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers/status + verbs: + - get + - update + - patch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/finalizers + verbs: + - get + - update + - patch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/status + verbs: + - get + - update + - patch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - '' + resources: + - secrets + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - '' + resources: + - services + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + serviceAccountName: seldon + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - mlops + - aiops + - production + - monitoring + labels: + name: seldon-operator + links: + - name: Website + url: https://www.seldon.io/ + - name: Documentation + url: https://docs.seldon.io/projects/seldon-core/en/latest/ + - name: Seldon Operator + url: https://github.com/seldonio/seldon-operator + maintainers: + - email: hello@seldon.io + name: Seldon Technologies + maturity: alpha + minKubeVersion: 1.12.0 + provider: + name: Seldon Technologies + replaces: seldonoperator.v0.1.4 + selector: + matchLabels: + name: seldon-operator + version: 0.1.5 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/machinelearning.seldon.io_seldondeployment_crd.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/machinelearning.seldon.io_seldondeployment_crd.yaml new file mode 100644 index 0000000000..aec7d44546 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/machinelearning.seldon.io_seldondeployment_crd.yaml @@ -0,0 +1,4911 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + creationTimestamp: null + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldondeployments.machinelearning.seldon.io +spec: + group: machinelearning.seldon.io + names: + kind: SeldonDeployment + plural: seldondeployments + shortNames: + - sdep + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: SeldonDeployment is the Schema for the seldondeployments API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: SeldonDeploymentSpec defines the desired state of SeldonDeployment + properties: + annotations: + additionalProperties: + type: string + type: object + name: + description: Name is Deprecated will be removed in future + type: string + oauth_key: + type: string + oauth_secret: + type: string + predictors: + items: + properties: + annotations: + additionalProperties: + type: string + type: object + componentSpecs: + items: + properties: + hpaSpec: + properties: + maxReplicas: + format: int32 + type: integer + metrics: + items: + description: MetricSpec specifies how to scale based + on a single metric (only `type` and one other matching + field should be set at once). + properties: + external: + description: external refers to a global metric + that is not associated with any Kubernetes object. + It allows autoscaling based on information coming + from components running outside of cluster (for + example length of queue in cloud messaging service, + or QPS from loadbalancer running outside of + cluster). + properties: + metricName: + description: metricName is the name of the + metric in question. + type: string + metricSelector: + description: metricSelector is used to identify + a specific time series within a given metric. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + targetAverageValue: + description: targetAverageValue is the target + per-pod value of global metric (as a quantity). + Mutually exclusive with TargetValue. + type: string + targetValue: + description: targetValue is the target value + of the metric (as a quantity). Mutually + exclusive with TargetAverageValue. + type: string + required: + - metricName + type: object + object: + description: object refers to a metric describing + a single kubernetes object (for example, hits-per-second + on an Ingress object). + properties: + averageValue: + description: averageValue is the target value + of the average of the metric across all + relevant pods (as a quantity) + type: string + metricName: + description: metricName is the name of the + metric in question. + type: string + selector: + description: selector is the string-encoded + form of a standard kubernetes label selector + for the given metric When set, it is passed + as an additional parameter to the metrics + server for more specific metrics scoping + When unset, just the metricName will be + used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + target: + description: target is the described Kubernetes + object. + properties: + apiVersion: + description: API version of the referent + type: string + kind: + description: 'Kind of the referent; More + info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"' + type: string + name: + description: 'Name of the referent; More + info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + required: + - kind + - name + type: object + targetValue: + description: targetValue is the target value + of the metric (as a quantity). + type: string + required: + - metricName + - target + - targetValue + type: object + pods: + description: pods refers to a metric describing + each pod in the current scale target (for example, + transactions-processed-per-second). The values + will be averaged together before being compared + to the target value. + properties: + metricName: + description: metricName is the name of the + metric in question + type: string + selector: + description: selector is the string-encoded + form of a standard kubernetes label selector + for the given metric When set, it is passed + as an additional parameter to the metrics + server for more specific metrics scoping + When unset, just the metricName will be + used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + targetAverageValue: + description: targetAverageValue is the target + value of the average of the metric across + all relevant pods (as a quantity) + type: string + required: + - metricName + - targetAverageValue + type: object + resource: + description: resource refers to a resource metric + (such as those specified in requests and limits) + known to Kubernetes describing each pod in the + current scale target (e.g. CPU or memory). Such + metrics are built in to Kubernetes, and have + special scaling options on top of those available + to normal per-pod metrics using the "pods" source. + properties: + name: + description: name is the name of the resource + in question. + type: string + targetAverageUtilization: + description: targetAverageUtilization is the + target value of the average of the resource + metric across all relevant pods, represented + as a percentage of the requested value of + the resource for the pods. + format: int32 + type: integer + targetAverageValue: + description: targetAverageValue is the target + value of the average of the resource metric + across all relevant pods, as a raw value + (instead of as a percentage of the request), + similar to the "pods" metric source type. + type: string + required: + - name + type: object + type: + description: type is the type of metric source. It + should be one of "Object", "Pods" or "Resource", + each mapping to a matching field in the object. + type: string + required: + - type + type: object + type: array + minReplicas: + format: int32 + type: integer + required: + - maxReplicas + type: object + metadata: + type: object + spec: + description: PodSpec is a description of a pod. + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may + be active on the node relative to StartTime before + the system will actively try to mark it failed and + kill associated containers. Value must be a positive + integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling + rules for the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose + a node that violates one or more of the expressions. + The node that is most preferred is the one + with the greatest sum of weights, i.e. for + each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum + by iterating through the elements of this + field and adding "weight" to the sum if the + node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most + preferred. + items: + description: An empty preferred scheduling + term matches all objects with implicit weight + 0 (i.e. it's a no-op). A null preferred + scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated + with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + description: Weight associated with matching + the corresponding nodeSelectorTerm, + in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. + If the affinity requirements specified by + this field cease to be met at some point during + pod execution (e.g. due to an update), the + system may or may not try to eventually evict + the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector + terms. The terms are ORed. + items: + description: A null or empty node selector + term matches no objects. The requirements + of them are ANDed. The TopologySelectorTerm + type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + description: Describes pod affinity scheduling rules + (e.g. co-locate this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose + a node that violates one or more of the expressions. + The node that is most preferred is the one + with the greatest sum of weights, i.e. for + each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum + by iterating through the elements of this + field and adding "weight" to the sum if the + node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest + sum are the most preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added + per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity + term, associated with the corresponding + weight. + properties: + labelSelector: + description: A label query over a + set of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies + which namespaces the labelSelector + applies to (matches against); null + or empty list means "this pod's + namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where + co-located is defined as running + on a node whose value of the label + with key topologyKey matches that + of any node on which any of the + selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in + the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. + If the affinity requirements specified by + this field cease to be met at some point during + pod execution (e.g. due to a pod label update), + the system may or may not try to eventually + evict the pod from its node. When there are + multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely + those matching the labelSelector relative + to the given namespace(s)) that this pod + should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is + defined as running on a node whose value + of the label with key matches + that of any node on which a pod of the set + of pods is running + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a + set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values + array must be non-empty. If + the operator is Exists or + DoesNotExist, the values array + must be empty. This array + is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + namespaces: + description: namespaces specifies which + namespaces the labelSelector applies + to (matches against); null or empty + list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling + rules (e.g. avoid putting this pod in the same + node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the anti-affinity + expressions specified by this field, but it + may choose a node that violates one or more + of the expressions. The node that is most + preferred is the one with the greatest sum + of weights, i.e. for each node that meets + all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity + expressions, etc.), compute a sum by iterating + through the elements of this field and adding + "weight" to the sum if the node has pods which + matches the corresponding podAffinityTerm; + the node(s) with the highest sum are the most + preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added + per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity + term, associated with the corresponding + weight. + properties: + labelSelector: + description: A label query over a + set of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies + which namespaces the labelSelector + applies to (matches against); null + or empty list means "this pod's + namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where + co-located is defined as running + on a node whose value of the label + with key topologyKey matches that + of any node on which any of the + selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in + the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements + specified by this field are not met at scheduling + time, the pod will not be scheduled onto the + node. If the anti-affinity requirements specified + by this field cease to be met at some point + during pod execution (e.g. due to a pod label + update), the system may or may not try to + eventually evict the pod from its node. When + there are multiple elements, the lists of + nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely + those matching the labelSelector relative + to the given namespace(s)) that this pod + should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is + defined as running on a node whose value + of the label with key matches + that of any node on which a pod of the set + of pods is running + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a + set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values + array must be non-empty. If + the operator is Exists or + DoesNotExist, the values array + must be empty. This array + is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + namespaces: + description: namespaces specifies which + namespaces the labelSelector applies + to (matches against); null or empty + list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates + whether a service account token should be automatically + mounted. + type: boolean + containers: + description: List of containers belonging to the pod. + Containers cannot currently be added or removed. There + must be at least one container in a Pod. Cannot be + updated. + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The + docker image''s CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable + cannot be resolved, the reference in the input + string will be unchanged. The $(VAR_NAME) syntax + can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The docker image''s ENTRYPOINT is used + if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a + double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to + set in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) + are expanded using the previous defined + environment variables in the container + and any service environment variables. + If a variable cannot be resolved, the + reference in the input string will be + unchanged. The $(VAR_NAME) syntax can + be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, + regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if value + is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or it's key must be + defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + description: Specifies the output + format of the exposed resources, + defaults to "1" + type: string + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment + variables in the container. The keys defined + within a source must be a C_IDENTIFIER. All + invalid keys will be reported as an event when + the container is starting. When a key exists + in multiple sources, the value associated with + the last source will take precedence. Values + defined by an Env with a duplicate key will + take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be + a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level + config management to default or override container + images in workload controllers like Deployments + and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, + Never, IfNotPresent. Defaults to Always if :latest + tag is specified, or IfNotPresent otherwise. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately + before a container is terminated due to + an API request or management event such + as liveness probe failure, preemption, resource + contention, etc. The handler is not called + if the container crashes or exits. The reason + for termination is passed to the handler. + The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. + Regardless of the outcome of the handler, + the container will eventually terminate + within the Pod''s termination grace period. + Other management of the container blocks + until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as + a DNS_LABEL. Each container in a pod must have + a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: List of ports to expose from the + container. Exposing a port here gives the system + additional information about the network connections + a container uses, but is primarily informational. + Not specifying a port here DOES NOT prevent + that port from being exposed. Any port which + is listening on the default "0.0.0.0" address + inside a container will be accessible from the + network. Cannot be updated. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on + the pod's IP address. This must be a valid + port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: Number of port to expose on + the host. If specified, this must be a + valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be + an IANA_SVC_NAME and unique within the + pod. Each named port in a pod must have + a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be + UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum + amount of compute resources required. If + Requests is omitted for a container, it + defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls + whether a process can gain more privileges + than its parent process. This bool directly + controls if the no_new_privs flag will be + set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) + run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop + when running containers. Defaults to the + default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: procMount denotes the type of + proc mount to use for the containers. The + default is DefaultProcMount which uses the + container runtime defaults for readonly + paths and masked paths. This requires the + ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a + read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint + of the container process. Uses runtime default + if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container + must run as a non-root user. If true, the + Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 + (root) and fail to start the container if + it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint + of the container process. Defaults to user + specified in image metadata if unspecified. + May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate + a buffer for stdin in the container runtime. + If this is not set, reads from stdin in the + container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should + close the stdin channel after it has been opened + by a single attach. When stdin is true the stdin + stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until + the first client attaches to stdin, and then + remains open and accepts data until the client + disconnects, at which time stdin is closed and + remains closed until the container is restarted. + If this flag is false, a container processes + that reads from stdin will never receive an + EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file + to which the container''s termination message + will be written is mounted into the container''s + filesystem. Message written is intended to be + brief final status, such as an assertion failure + message. Will be truncated by the node if greater + than 4096 bytes. The total message length across + all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message + should be populated. File will use the contents + of terminationMessagePath to populate the container + status message on both success and failure. + FallbackToLogsOnError will use the last chunk + of container log output if the termination message + file is empty and the container exited with + an error. The log output is limited to 2048 + bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be + true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This is + a beta feature. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will + be mapped to. + type: string + name: + description: name must match the name of + a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container at + which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines + how mounts are propagated from the host + to container and the other way around. + When not set, MountPropagationNone is + used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of + a Volume. + type: string + readOnly: + description: Mounted read-only if true, + read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + subPath: + description: Path within the volume from + which the container's volume should be + mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume + from which the container's volume should + be mounted. Behaves similarly to SubPath + but environment variable references $(VAR_NAME) + are expanded using the container's environment. + Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. This + field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If + not specified, the container runtime's default + will be used, which might be configured in the + container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + dnsConfig: + description: Specifies the DNS parameters of a pod. + Parameters specified here will be merged to the generated + DNS configuration based on DNSPolicy. + properties: + nameservers: + description: A list of DNS name server IP addresses. + This will be appended to the base nameservers + generated from DNSPolicy. Duplicated nameservers + will be removed. + items: + type: string + type: array + options: + description: A list of DNS resolver options. This + will be merged with the base options generated + from DNSPolicy. Duplicated entries will be removed. + Resolution options given in Options will override + those that appear in the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver + options of a pod. + properties: + name: + description: Required. + type: string + value: + type: string + type: object + type: array + searches: + description: A list of DNS search domains for host-name + lookup. This will be appended to the base search + paths generated from DNSPolicy. Duplicated search + paths will be removed. + items: + type: string + type: array + type: object + dnsPolicy: + description: Set DNS policy for the pod. Defaults to + "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', + 'ClusterFirst', 'Default' or 'None'. DNS parameters + given in DNSConfig will be merged with the policy + selected with DNSPolicy. To have DNS options set along + with hostNetwork, you have to specify DNS policy explicitly + to 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: 'EnableServiceLinks indicates whether information + about services should be injected into pod''s environment + variables, matching the syntax of Docker links. Optional: + Defaults to true.' + type: boolean + hostAliases: + description: HostAliases is an optional list of hosts + and IPs that will be injected into the pod's hosts + file if specified. This is only valid for non-hostNetwork + pods. + items: + description: HostAlias holds the mapping between IP + and hostnames that will be injected as an entry + in the pod's hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + ip: + description: IP address of the host file entry. + type: string + type: object + type: array + hostIPC: + description: 'Use the host''s ipc namespace. Optional: + Default to false.' + type: boolean + hostNetwork: + description: Host networking requested for this pod. + Use the host's network namespace. If this option is + set, the ports that will be used must be specified. + Default to false. + type: boolean + hostPID: + description: 'Use the host''s pid namespace. Optional: + Default to false.' + type: boolean + hostname: + description: Specifies the hostname of the Pod If not + specified, the pod's hostname will be set to a system-defined + value. + type: string + imagePullSecrets: + description: 'ImagePullSecrets is an optional list of + references to secrets in the same namespace to use + for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual + puller implementations for them to use. For example, + in the case of docker, only DockerConfig type secrets + are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod' + items: + description: LocalObjectReference contains enough + information to let you locate the referenced object + inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + type: array + initContainers: + description: 'List of initialization containers belonging + to the pod. Init containers are executed in order + prior to containers being started. If any init container + fails, the pod is considered to have failed and is + handled according to its restartPolicy. The name for + an init container or normal container must be unique + among all containers. Init containers may not have + Lifecycle actions, Readiness probes, or Liveness probes. + The resourceRequirements of an init container are + taken into account during scheduling by finding the + highest request/limit for each resource type, and + then using the max of of that value or the sum of + the normal containers. Limits are applied to init + containers in a similar fashion. Init containers cannot + currently be added or removed. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The + docker image''s CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable + cannot be resolved, the reference in the input + string will be unchanged. The $(VAR_NAME) syntax + can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The docker image''s ENTRYPOINT is used + if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a + double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to + set in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) + are expanded using the previous defined + environment variables in the container + and any service environment variables. + If a variable cannot be resolved, the + reference in the input string will be + unchanged. The $(VAR_NAME) syntax can + be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, + regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if value + is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or it's key must be + defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + description: Specifies the output + format of the exposed resources, + defaults to "1" + type: string + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment + variables in the container. The keys defined + within a source must be a C_IDENTIFIER. All + invalid keys will be reported as an event when + the container is starting. When a key exists + in multiple sources, the value associated with + the last source will take precedence. Values + defined by an Env with a duplicate key will + take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be + a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level + config management to default or override container + images in workload controllers like Deployments + and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, + Never, IfNotPresent. Defaults to Always if :latest + tag is specified, or IfNotPresent otherwise. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately + before a container is terminated due to + an API request or management event such + as liveness probe failure, preemption, resource + contention, etc. The handler is not called + if the container crashes or exits. The reason + for termination is passed to the handler. + The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. + Regardless of the outcome of the handler, + the container will eventually terminate + within the Pod''s termination grace period. + Other management of the container blocks + until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as + a DNS_LABEL. Each container in a pod must have + a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: List of ports to expose from the + container. Exposing a port here gives the system + additional information about the network connections + a container uses, but is primarily informational. + Not specifying a port here DOES NOT prevent + that port from being exposed. Any port which + is listening on the default "0.0.0.0" address + inside a container will be accessible from the + network. Cannot be updated. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on + the pod's IP address. This must be a valid + port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: Number of port to expose on + the host. If specified, this must be a + valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be + an IANA_SVC_NAME and unique within the + pod. Each named port in a pod must have + a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be + UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum + amount of compute resources required. If + Requests is omitted for a container, it + defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls + whether a process can gain more privileges + than its parent process. This bool directly + controls if the no_new_privs flag will be + set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) + run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop + when running containers. Defaults to the + default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: procMount denotes the type of + proc mount to use for the containers. The + default is DefaultProcMount which uses the + container runtime defaults for readonly + paths and masked paths. This requires the + ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a + read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint + of the container process. Uses runtime default + if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container + must run as a non-root user. If true, the + Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 + (root) and fail to start the container if + it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint + of the container process. Defaults to user + specified in image metadata if unspecified. + May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate + a buffer for stdin in the container runtime. + If this is not set, reads from stdin in the + container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should + close the stdin channel after it has been opened + by a single attach. When stdin is true the stdin + stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until + the first client attaches to stdin, and then + remains open and accepts data until the client + disconnects, at which time stdin is closed and + remains closed until the container is restarted. + If this flag is false, a container processes + that reads from stdin will never receive an + EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file + to which the container''s termination message + will be written is mounted into the container''s + filesystem. Message written is intended to be + brief final status, such as an assertion failure + message. Will be truncated by the node if greater + than 4096 bytes. The total message length across + all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message + should be populated. File will use the contents + of terminationMessagePath to populate the container + status message on both success and failure. + FallbackToLogsOnError will use the last chunk + of container log output if the termination message + file is empty and the container exited with + an error. The log output is limited to 2048 + bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be + true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This is + a beta feature. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will + be mapped to. + type: string + name: + description: name must match the name of + a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container at + which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines + how mounts are propagated from the host + to container and the other way around. + When not set, MountPropagationNone is + used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of + a Volume. + type: string + readOnly: + description: Mounted read-only if true, + read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + subPath: + description: Path within the volume from + which the container's volume should be + mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume + from which the container's volume should + be mounted. Behaves similarly to SubPath + but environment variable references $(VAR_NAME) + are expanded using the container's environment. + Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. This + field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If + not specified, the container runtime's default + will be used, which might be configured in the + container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + nodeName: + description: NodeName is a request to schedule this + pod onto a specific node. If it is non-empty, the + scheduler simply schedules this pod onto that node, + assuming that it fits resource requirements. + type: string + nodeSelector: + additionalProperties: + type: string + description: 'NodeSelector is a selector which must + be true for the pod to fit on a node. Selector which + must match a node''s labels for the pod to be scheduled + on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' + type: object + priority: + description: The priority value. Various system components + use this field to find the priority of the pod. When + Priority Admission Controller is enabled, it prevents + users from setting this field. The admission controller + populates this field from PriorityClassName. The higher + the value, the higher the priority. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + "system-node-critical" and "system-cluster-critical" + are two special keywords which indicate the highest + priorities with the former being the highest priority. + Any other name must be defined by creating a PriorityClass + object with that name. If not specified, the pod priority + will be default or zero if there is no default. + type: string + readinessGates: + description: 'If specified, all readiness gates will + be evaluated for pod readiness. A pod is ready when + all its containers are ready AND all conditions specified + in the readiness gates have status equal to "True" + More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md' + items: + description: PodReadinessGate contains the reference + to a pod condition + properties: + conditionType: + description: ConditionType refers to a condition + in the pod's condition list with matching type. + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + description: 'Restart policy for all containers within + the pod. One of Always, OnFailure, Never. Default + to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' + type: string + runtimeClassName: + description: 'RuntimeClassName refers to a RuntimeClass + object in the node.k8s.io group, which should be used + to run this pod. If no RuntimeClass resource matches + the named class, the pod will not be run. If unset + or empty, the "legacy" RuntimeClass will be used, + which is an implicit class with an empty definition + that uses the default runtime handler. More info: + https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md + This is an alpha feature and may change in the future.' + type: string + schedulerName: + description: If specified, the pod will be dispatched + by specified scheduler. If not specified, the pod + will be dispatched by default scheduler. + type: string + securityContext: + description: 'SecurityContext holds pod-level security + attributes and common container settings. Optional: + Defaults to empty. See type description for default + values of each field.' + properties: + fsGroup: + description: "A special supplemental group that + applies to all containers in a pod. Some volume + types allow the Kubelet to change the ownership + of that volume to be owned by the pod: \n 1. The + owning GID will be the FSGroup 2. The setgid bit + is set (new files created in the volume will be + owned by FSGroup) 3. The permission bits are OR'd + with rw-rw---- \n If unset, the Kubelet will not + modify the ownership and permissions of any volume." + format: int64 + type: integer + runAsGroup: + description: The GID to run the entrypoint of the + container process. Uses runtime default if unset. + May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence + for that container. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run + as a non-root user. If true, the Kubelet will + validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no + such validation will be performed. May also be + set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in + SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the + container process. Defaults to user specified + in image metadata if unspecified. May also be + set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in + SecurityContext takes precedence for that container. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + all containers. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence + for that container. + properties: + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + supplementalGroups: + description: A list of groups applied to the first + process run in each container, in addition to + the container's primary GID. If unspecified, + no groups will be added to any container. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls + used for the pod. Pods with unsupported sysctls + (by the container runtime) might fail to launch. + items: + description: Sysctl defines a kernel parameter + to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + type: object + serviceAccount: + description: 'DeprecatedServiceAccount is a depreciated + alias for ServiceAccountName. Deprecated: Use serviceAccountName + instead.' + type: string + serviceAccountName: + description: 'ServiceAccountName is the name of the + ServiceAccount to use to run this pod. More info: + https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' + type: string + shareProcessNamespace: + description: 'Share a single process namespace between + all of the containers in a pod. When this is set containers + will be able to view and signal processes from other + containers in the same pod, and the first process + in each container will not be assigned PID 1. HostPID + and ShareProcessNamespace cannot both be set. Optional: + Default to false. This field is beta-level and may + be disabled with the PodShareProcessNamespace feature.' + type: boolean + subdomain: + description: If specified, the fully qualified Pod hostname + will be "...svc.". If not specified, the pod will not have + a domainname at all. + type: string + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully. May be decreased in delete + request. Value must be non-negative integer. The value + zero indicates delete immediately. If this value is + nil, the default grace period will be used instead. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than + the expected cleanup time for your process. Defaults + to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to + tolerates any taint that matches the triple + using the matching operator . + properties: + effect: + description: Effect indicates the taint effect + to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, + PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; + this combination means to match all values and + all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and + Equal. Defaults to Equal. Exists is equivalent + to wildcard for value, so that a pod can tolerate + all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the + period of time the toleration (which must be + of effect NoExecute, otherwise this field is + ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever + (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration + matches to. If the operator is Exists, the value + should be empty, otherwise just a regular string. + type: string + type: object + type: array + volumes: + description: 'List of volumes that can be mounted by + containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' + items: + type: object + type: array + required: + - containers + type: object + type: object + type: array + engineResources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + explainer: + properties: + config: + additionalProperties: + type: string + type: object + containerSpec: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The docker + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. The $(VAR_NAME) + syntax can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a + shell. The docker image''s ENTRYPOINT is used if this + is not provided. Variable references $(VAR_NAME) are + expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string + will be unchanged. The $(VAR_NAME) syntax can be escaped + with a double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the + container. Cannot be updated. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previous defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a double + $$, ie: $$(VAR_NAME). Escaped references will + never be expanded, regardless of whether the variable + exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or it's key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + description: Specifies the output format + of the exposed resources, defaults to + "1" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must + be a C_IDENTIFIER. All invalid keys will be reported + as an event when the container is starting. When a key + exists in multiple sources, the value associated with + the last source will take precedence. Values defined + by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the source of + a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret must + be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config + management to default or override container images in + workload controllers like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, + IfNotPresent. Defaults to Always if :latest tag is specified, + or IfNotPresent otherwise. Cannot be updated. More info: + https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should + take in response to container lifecycle events. Cannot + be updated. + properties: + postStart: + description: 'PostStart is called immediately after + a container is created. If the handler fails, the + container is terminated and restarted according + to its restart policy. Other management of the container + blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') + in the container's filesystem. The command + is simply exec'd, it is not run inside a + shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you + need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before + a container is terminated due to an API request + or management event such as liveness probe failure, + preemption, resource contention, etc. The handler + is not called if the container crashes or exits. + The reason for termination is passed to the handler. + The Pod''s termination grace period countdown begins + before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will + eventually terminate within the Pod''s termination + grace period. Other management of the container + blocks until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') + in the container's filesystem. The command + is simply exec'd, it is not run inside a + shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you + need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory + for the command is root ('/') in the container's + filesystem. The command is simply exec'd, it + is not run inside a shell, so traditional shell + instructions ('|', etc) won't work. To use a + shell, you need to explicitly call out to that + shell. Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the + probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. + Exposing a port here gives the system additional information + about the network connections a container uses, but + is primarily informational. Not specifying a port here + DOES NOT prevent that port from being exposed. Any port + which is listening on the default "0.0.0.0" address + inside a container will be accessible from the network. + Cannot be updated. + items: + description: ContainerPort represents a network port + in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's + IP address. This must be a valid port number, + 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port + to. + type: string + hostPort: + description: Number of port to expose on the host. + If specified, this must be a valid port number, + 0 < x < 65536. If HostNetwork is specified, this + must match ContainerPort. Most containers do not + need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in + a pod must have a unique name. Name for the port + that can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, TCP, + or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if + the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory + for the command is root ('/') in the container's + filesystem. The command is simply exec'd, it + is not run inside a shell, so traditional shell + instructions ('|', etc) won't work. To use a + shell, you need to explicitly call out to that + shell. Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the + probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. + More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as + Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the + container process. Uses runtime default if unset. + May also be set in PodSecurityContext. If set in + both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run + as a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not + run as UID 0 (root) and fail to start the container + if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the + container process. Defaults to user specified in + image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + the container. If unspecified, the container runtime + will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate a + buffer for stdin in the container runtime. If this is + not set, reads from stdin in the container will always + result in EOF. Default is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close + the stdin channel after it has been opened by a single + attach. When stdin is true the stdin stream will remain + open across multiple attach sessions. If stdinOnce is + set to true, stdin is opened on container start, is + empty until the first client attaches to stdin, and + then remains open and accepts data until the client + disconnects, at which time stdin is closed and remains + closed until the container is restarted. If this flag + is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which + the container''s termination message will be written + is mounted into the container''s filesystem. Message + written is intended to be brief final status, such as + an assertion failure message. Will be truncated by the + node if greater than 4096 bytes. The total message length + across all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should + be populated. File will use the contents of terminationMessagePath + to populate the container status message on both success + and failure. FallbackToLogsOnError will use the last + chunk of container log output if the termination message + file is empty and the container exited with an error. + The log output is limited to 2048 bytes or 80 lines, + whichever is smaller. Defaults to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a + TTY for itself, also requires 'stdin' to be true. Default + is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices + to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw + block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the + container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which + the volume should be mounted. Must not contain + ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and + the other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to + false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults + to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the + container's environment. Defaults to "" (volume's + root). SubPathExpr and SubPath are mutually exclusive. + This field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which + might be configured in the container image. Cannot be + updated. + type: string + required: + - name + type: object + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + modelUri: + type: string + serviceAccountName: + type: string + type: + type: string + type: object + graph: + properties: + children: + items: + properties: + children: + items: + properties: + children: + items: + properties: + children: + items: + properties: + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload + logging. v2alpha1 feature that is + added to v1 for backwards compatibility + while v1 is the storage version. + properties: + mode: + description: What payloads to + log + type: string + url: + description: URL to send request + logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. + v2alpha1 feature that is added to v1 for + backwards compatibility while v1 is the + storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging + CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. + v2alpha1 feature that is added to v1 for backwards + compatibility while v1 is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. v2alpha1 + feature that is added to v1 for backwards compatibility + while v1 is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. v2alpha1 feature + that is added to v1 for backwards compatibility while v1 + is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + required: + - name + - type + - value + type: object + type: array + serviceAccountName: + type: string + type: + type: string + required: + - name + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + protocol: + type: string + replicas: + format: int32 + type: integer + shadow: + type: boolean + svcOrchSpec: + properties: + env: + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previous defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in + the input string will be unchanged. The $(VAR_NAME) + syntax can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + it's key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + description: Specifies the output format of + the exposed resources, defaults to "1" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or it's + key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount of + compute resources required. If Requests is omitted for + a container, it defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined value. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + type: object + traffic: + format: int32 + type: integer + transport: + type: string + required: + - graph + - name + type: object + type: array + required: + - predictors + type: object + status: + description: SeldonDeploymentStatus defines the observed state of SeldonDeployment + properties: + deploymentStatus: + additionalProperties: + properties: + availableReplicas: + format: int32 + type: integer + description: + type: string + explainerFor: + type: string + name: + type: string + replicas: + format: int32 + type: integer + status: + type: string + type: object + type: object + description: + type: string + serviceStatus: + additionalProperties: + properties: + explainerFor: + type: string + grpcEndpoint: + type: string + httpEndpoint: + type: string + svcName: + type: string + type: object + type: object + state: + type: string + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true + - name: v1alpha2 + served: true + storage: false + - name: v1alpha3 + served: true + storage: false +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml new file mode 100644 index 0000000000..6e233e8f76 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -0,0 +1,491 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "machinelearning.seldon.io/v1", + "kind": "SeldonDeployment", + "metadata": { + "name": "seldon-model" + }, + "spec": { + "name": "test-deployment", + "predictors": [ + { + "componentSpecs": [ + { + "spec": { + "containers": [ + { + "image": "seldonio/mock_classifier_rest:1.3", + "name": "classifier" + } + ] + } + } + ], + "graph": { + "children": [], + "endpoint": { + "type": "REST" + }, + "name": "classifier", + "type": "MODEL" + }, + "name": "example", + "replicas": 1 + } + ] + } + } + ] + capabilities: Seamless Upgrades + categories: Logging & Tracing + certified: "false" + containerImage: seldonio/seldon-core-operator:1.0.3-SNAPSHOT + createdAt: "2019-05-21 15:00:00" + description: The Seldon operator for management, monitoring and operations of + machine learning systems through the Seldon Engine. Once installed, the Seldon + Operator provides multiple functions which facilitate the productisation, monitoring + and maintenance of machine learning systems at scale. + repository: https://github.com/SeldonIO/seldon-operator + support: Clive Cox + name: seldon-operator.v1.1.0 + namespace: seldon-operator-system +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: A seldon engine deployment + displayName: Seldon Delpoyment + kind: SeldonDeployment + name: seldondeployments.machinelearning.seldon.io + resources: + - kind: SeldonDeployment + name: "" + version: v1 + - kind: Deployment + name: "" + version: v1 + - kind: ConfigMap + name: "" + version: v1 + - kind: Namespace + name: "" + version: v1 + - kind: Service + name: "" + version: v1 + - kind: Event + name: "" + version: v1 + - kind: HorizontalPodAutoscaler + name: "" + version: v2beta1 + - kind: MutatingWebhookConfiguration + name: "" + version: v1beta1 + - kind: ValidatingWebhookConfiguration + name: "" + version: v1beta1 + specDescriptors: + - description: Name of the seldon deployment + displayName: name + path: name + - description: List of predictors + displayName: predictors + path: predictors + statusDescriptors: + - description: State of the SeldonDeployment + displayName: state + path: state + - description: State of the services created from the SeldonDeployment + displayName: serviceStatus + path: serviceStatus + - description: State of the deployments created from the SeldonDeployment + displayName: deploymentStatus + path: deploymentStatus + version: v1 + description: "The Seldon operator enables for native operation of production machine + learning workloads, including monitoring and operations of language-agnostic models + with the benefits of real-time metrics and log analysis.\n \n## Overview\nSeldon + Core is an open source platform for deploying machine learning models on a Kubernetes + cluster.\n\n* Deploy machine learning models in the cloud or on-premise.\n* Get + metrics and ensure proper governance and compliance for your running machine learning + models.\n* Create powerful inference graphs made up of multiple components.\n* + Provide a consistent serving layer for models built using heterogeneous ML toolkits.\n\nYou + can get started by following the guides in our documentation at https://docs.seldon.io/projects/seldon-core/en/latest/workflow/README.html\n" + displayName: Seldon Operator + icon: + - base64data: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAChAegDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U6KKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiio7i4is7eWeeVIYIlLySSMFVFAySSegA70CbUVdklFeKeKv2o9E0i9Nvo+nTa2qMQ9w0vkRHgfcJVi3ORyB04yDWZp/7WlpJdot94bmtrU53SW92JXHHGFKKDz/tCvSjl2KlHmUPy/Lc+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ABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k= + mediatype: image/jpeg + install: + spec: + clusterPermissions: + - rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - get + - list + - watch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - create + - update + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - patch + - update + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers/status + verbs: + - get + - patch + - update + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/finalizers + verbs: + - get + - patch + - update + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/status + verbs: + - get + - patch + - update + - apiGroups: + - networking.istio.io + resources: + - destinationrules + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - networking.istio.io + resources: + - destinationrules/status + verbs: + - get + - patch + - update + - apiGroups: + - networking.istio.io + resources: + - virtualservices + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - networking.istio.io + resources: + - virtualservices/status + verbs: + - get + - patch + - update + - apiGroups: + - v1 + resources: + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - v1 + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - v1 + resources: + - services/status + verbs: + - get + - patch + - update + serviceAccountName: seldon-manager + deployments: + - name: seldon-controller-manager + spec: + replicas: 1 + selector: + matchLabels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + control-plane: seldon-controller-manager + strategy: {} + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + control-plane: seldon-controller-manager + spec: + containers: + - args: + - --enable-leader-election + - --webhook-port=443 + - --create-resources=$(CREATE_RESOURCES) + command: + - /manager + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: CREATE_RESOURCES + value: "true" + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONTROLLER_ID + - name: AMBASSADOR_ENABLED + value: "true" + - name: AMBASSADOR_SINGLE_NAMESPACE + value: "false" + - name: ENGINE_CONTAINER_IMAGE_AND_VERSION + value: docker.io/seldonio/engine:1.0.3-SNAPSHOT + - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + - name: ENGINE_CONTAINER_USER + value: "8888" + - name: ENGINE_LOG_MESSAGES_EXTERNALLY + value: "false" + - name: PREDICTIVE_UNIT_SERVICE_PORT + value: "9000" + - name: ENGINE_SERVER_GRPC_PORT + value: "5001" + - name: ENGINE_SERVER_PORT + value: "8000" + - name: ENGINE_PROMETHEUS_PATH + value: /prometheus + - name: ISTIO_ENABLED + value: "false" + - name: ISTIO_GATEWAY + value: seldon-gateway + - name: ISTIO_TLS_MODE + - name: USE_EXECUTOR + value: "true" + - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION + value: seldonio/seldon-core-executor:1.0.3-SNAPSHOT + - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: EXECUTOR_PROMETHEUS_PATH + value: /prometheus + - name: EXECUTOR_SERVER_GRPC_PORT + value: "5001" + - name: EXECUTOR_SERVER_PORT + value: "8000" + - name: EXECUTOR_CONTAINER_USER + value: "8888" + - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + image: seldonio/seldon-core-operator:1.0.3-SNAPSHOT + name: manager + ports: + - containerPort: 443 + name: webhook-server + protocol: TCP + resources: + limits: + cpu: 500m + memory: 300Mi + requests: + cpu: 100m + memory: 200Mi + serviceAccountName: seldon-manager + terminationGracePeriodSeconds: 10 + permissions: + - rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + serviceAccountName: seldon-manager + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - mlops + - aiops + - production + - monitoring + labels: + name: seldon-operator + links: + - name: Website + url: https://www.seldon.io/ + - name: Documentation + url: https://docs.seldon.io/projects/seldon-core/en/latest/ + - name: Seldon Operator + url: https://github.com/seldonio/seldon-operator + maintainers: + - email: hello@seldon.io + name: Seldon Technologies + maturity: alpha + minKubeVersion: 1.13.0 + provider: + name: Seldon Technologies + replaces: seldonoperator.v0.1.5 + selector: + matchLabels: + name: seldon-operator + version: 1.1.0 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/seldon-operator.package.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/seldon-operator.package.yaml new file mode 100644 index 0000000000..d0f7d753ac --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/seldon-operator.package.yaml @@ -0,0 +1,5 @@ +channels: +- currentCSV: seldon-operator.v1.1.0 + name: alpha +defaultChannel: alpha +packageName: seldon-operator diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml new file mode 100644 index 0000000000..fdcf6efaec --- /dev/null +++ b/operator/seldon-operator/deploy/operator.yaml @@ -0,0 +1,108 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + control-plane: seldon-controller-manager + name: seldon-controller-manager + namespace: default +spec: + replicas: 1 + selector: + matchLabels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + control-plane: seldon-controller-manager + template: + metadata: + annotations: + sidecar.istio.io/inject: 'false' + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + control-plane: seldon-controller-manager + spec: + containers: + - args: + - --enable-leader-election + - --webhook-port=443 + - --create-resources=$(CREATE_RESOURCES) + command: + - /manager + env: + - name: WATCH_NAMESPACE + value: '' + - name: CREATE_RESOURCES + value: 'true' + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONTROLLER_ID + value: '' + - name: AMBASSADOR_ENABLED + value: 'true' + - name: AMBASSADOR_SINGLE_NAMESPACE + value: 'false' + - name: ENGINE_CONTAINER_IMAGE_AND_VERSION + value: docker.io/seldonio/engine:1.0.3-SNAPSHOT + - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + - name: ENGINE_CONTAINER_USER + value: '8888' + - name: ENGINE_LOG_MESSAGES_EXTERNALLY + value: 'false' + - name: PREDICTIVE_UNIT_SERVICE_PORT + value: '9000' + - name: ENGINE_SERVER_GRPC_PORT + value: '5001' + - name: ENGINE_SERVER_PORT + value: '8000' + - name: ENGINE_PROMETHEUS_PATH + value: /prometheus + - name: ISTIO_ENABLED + value: 'false' + - name: ISTIO_GATEWAY + value: seldon-gateway + - name: ISTIO_TLS_MODE + value: '' + - name: USE_EXECUTOR + value: 'true' + - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION + value: seldonio/seldon-core-executor:1.0.3-SNAPSHOT + - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: EXECUTOR_PROMETHEUS_PATH + value: /prometheus + - name: EXECUTOR_SERVER_GRPC_PORT + value: '5001' + - name: EXECUTOR_SERVER_PORT + value: '8000' + - name: EXECUTOR_CONTAINER_USER + value: '8888' + - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + image: seldonio/seldon-core-operator:1.0.3-SNAPSHOT + name: manager + ports: + - containerPort: 443 + name: webhook-server + protocol: TCP + resources: + limits: + cpu: 500m + memory: 300Mi + requests: + cpu: 100m + memory: 200Mi + serviceAccountName: seldon-manager + terminationGracePeriodSeconds: 10 diff --git a/operator/seldon-operator/deploy/role.yaml b/operator/seldon-operator/deploy/role.yaml new file mode 100644 index 0000000000..8e35e833c3 --- /dev/null +++ b/operator/seldon-operator/deploy/role.yaml @@ -0,0 +1,235 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + creationTimestamp: null + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-manager +rules: +- apiGroups: + - '' + resources: + - secrets + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - configmaps + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - serviceaccounts + verbs: + - get + - list + - watch +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - create + - update +- apiGroups: + - '' + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - '' + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - patch + - update +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers/status + verbs: + - get + - patch + - update +- apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/finalizers + verbs: + - get + - patch + - update +- apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/status + verbs: + - get + - patch + - update +- apiGroups: + - networking.istio.io + resources: + - destinationrules + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - networking.istio.io + resources: + - destinationrules/status + verbs: + - get + - patch + - update +- apiGroups: + - networking.istio.io + resources: + - virtualservices + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - networking.istio.io + resources: + - virtualservices/status + verbs: + - get + - patch + - update +- apiGroups: + - v1 + resources: + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - v1 + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - v1 + resources: + - services/status + verbs: + - get + - patch + - update +- apiGroups: + - '' + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete +- apiGroups: + - '' + resources: + - configmaps/status + verbs: + - get + - update + - patch +- apiGroups: + - '' + resources: + - events + verbs: + - create +- apiGroups: + - '' + resources: + - configmaps + verbs: + - get + - list + - watch diff --git a/operator/seldon-operator/deploy/role_binding.yaml b/operator/seldon-operator/deploy/role_binding.yaml new file mode 100644 index 0000000000..dcbf71efb1 --- /dev/null +++ b/operator/seldon-operator/deploy/role_binding.yaml @@ -0,0 +1,17 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-manager-rolebinding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: seldon-manager +subjects: +- kind: ServiceAccount + name: seldon-manager + namespace: default diff --git a/operator/seldon-operator/deploy/service_account.yaml b/operator/seldon-operator/deploy/service_account.yaml new file mode 100644 index 0000000000..3ad921b5f5 --- /dev/null +++ b/operator/seldon-operator/deploy/service_account.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-manager + namespace: default diff --git a/operator/seldon-operator/testing/k8s/README.md b/operator/seldon-operator/testing/k8s/README.md new file mode 100644 index 0000000000..3fb912ca4f --- /dev/null +++ b/operator/seldon-operator/testing/k8s/README.md @@ -0,0 +1,6 @@ +# Test on Vanilla Kubernetes with OLM + +Follow https://github.com/operator-framework/community-operators/blob/master/docs/testing-operators.md#testing-operator-deployment-on-kubernetes + +Using resource in this folder. + diff --git a/operator/seldon-operator/testing/k8s/operator-group.yaml b/operator/seldon-operator/testing/k8s/operator-group.yaml new file mode 100644 index 0000000000..24fc65d1bf --- /dev/null +++ b/operator/seldon-operator/testing/k8s/operator-group.yaml @@ -0,0 +1,8 @@ +apiVersion: operators.coreos.com/v1alpha2 +kind: OperatorGroup +metadata: + name: seldon-operatorgroup + namespace: marketplace +spec: + targetNamespaces: + - marketplace diff --git a/operator/seldon-operator/testing/k8s/operator-source.yaml b/operator/seldon-operator/testing/k8s/operator-source.yaml new file mode 100644 index 0000000000..45a870099c --- /dev/null +++ b/operator/seldon-operator/testing/k8s/operator-source.yaml @@ -0,0 +1,9 @@ +apiVersion: operators.coreos.com/v1 +kind: OperatorSource +metadata: + name: seldon-operators + namespace: marketplace +spec: + type: appregistry + endpoint: https://quay.io/cnr + registryNamespace: seldon diff --git a/operator/seldon-operator/testing/k8s/operator-subscription.yaml b/operator/seldon-operator/testing/k8s/operator-subscription.yaml new file mode 100644 index 0000000000..76367651db --- /dev/null +++ b/operator/seldon-operator/testing/k8s/operator-subscription.yaml @@ -0,0 +1,10 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: seldon-operator-subsription + namespace: marketplace +spec: + channel: alpha + name: seldon-operator + source: seldon-operators + sourceNamespace: marketplace diff --git a/operator/seldon-operator/testing/standalone/create_standalone.sh b/operator/seldon-operator/testing/standalone/create_standalone.sh new file mode 100755 index 0000000000..de56e2163d --- /dev/null +++ b/operator/seldon-operator/testing/standalone/create_standalone.sh @@ -0,0 +1,9 @@ +DEPLOY=../../deploy +kubectl create -f ${DEPLOY}/cluster_role.yaml +kubectl create -f ${DEPLOY}/role_binding.yaml +kubectl create -f ${DEPLOY}/namespace_role.yaml +kubectl create -f ${DEPLOY}/namespace_role_binding.yaml +kubectl create -f ${DEPLOY}/service_account.yaml +kubectl create -f ${DEPLOY}/crds/machinelearning.seldon.io_seldondeployment_crd.yaml +kubectl create -f ${DEPLOY}/operator.yaml + diff --git a/operator/seldon-operator/testing/standalone/delete_standalone.sh b/operator/seldon-operator/testing/standalone/delete_standalone.sh new file mode 100755 index 0000000000..1eae9bca28 --- /dev/null +++ b/operator/seldon-operator/testing/standalone/delete_standalone.sh @@ -0,0 +1,9 @@ +DEPLOY=../../deploy +kubectl delete -f ${DEPLOY}/cluster_role.yaml +kubectl delete -f ${DEPLOY}/role_binding.yaml +kubectl delete -f ${DEPLOY}/namespace_role.yaml +kubectl delete -f ${DEPLOY}/namespace_role_binding.yaml +kubectl delete -f ${DEPLOY}/service_account.yaml +kubectl delete -f ${DEPLOY}/crds/machinelearning.seldon.io_seldondeployment_crd.yaml +kubectl delete -f ${DEPLOY}/operator.yaml + From 5e0c78dad0fe9b6e13a574c671a2ee30061e560c Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sun, 8 Mar 2020 20:07:28 +0000 Subject: [PATCH 08/34] further tests --- executor/api/rest/client_test.go | 2 - .../clusterrole_seldon-webhook-role.yaml | 8 ++ ...deployments.machinelearning.seldon.io.yaml | 135 +++++++++++++++--- .../role_seldon-manager-cm-role.yaml | 24 ---- ...binding_seldon-manager-cm-rolebinding.yaml | 22 --- .../templates/webhook.yaml | 32 ++--- operator/config/lite/kustomization.yaml | 1 - operator/config/lite/role_webhook.yaml | 8 ++ operator/config/rbac/kustomization.yaml | 2 - operator/config/rbac/role_binding_cm.yaml | 12 -- operator/config/rbac/role_cm.yaml | 16 --- operator/config/webhook/kustomization.yaml | 2 +- operator/main.go | 2 +- operator/seldon-operator/Makefile | 16 ++- .../seldon-operator/deploy/cluster_role.yaml | 8 ++ .../deploy/namespace_role.yaml | 8 -- ...operator.v1.1.0.clusterserviceversion.yaml | 21 +-- operator/seldon-operator/deploy/role.yaml | 16 +-- .../testing/openshift/README.md | 4 + .../testing/openshift/operator-source.yaml | 11 ++ .../standalone/create_standalone_namespace.sh | 9 ++ operator/utils/k8s/initializer.go | 6 +- operator/utils/k8s/webhook.go | 33 ++++- operator/utils/k8s/webhook_test.go | 4 +- 24 files changed, 243 insertions(+), 159 deletions(-) delete mode 100644 helm-charts/seldon-core-operator/templates/role_seldon-manager-cm-role.yaml delete mode 100644 helm-charts/seldon-core-operator/templates/rolebinding_seldon-manager-cm-rolebinding.yaml delete mode 100644 operator/config/rbac/role_binding_cm.yaml delete mode 100644 operator/config/rbac/role_cm.yaml create mode 100644 operator/seldon-operator/testing/openshift/README.md create mode 100644 operator/seldon-operator/testing/openshift/operator-source.yaml create mode 100755 operator/seldon-operator/testing/standalone/create_standalone_namespace.sh diff --git a/executor/api/rest/client_test.go b/executor/api/rest/client_test.go index d29dc1e68a..346da39a3b 100644 --- a/executor/api/rest/client_test.go +++ b/executor/api/rest/client_test.go @@ -3,7 +3,6 @@ package rest import ( "context" "crypto/tls" - "fmt" "github.com/golang/protobuf/jsonpb" . "github.com/onsi/gomega" "github.com/prometheus/client_golang/prometheus" @@ -295,5 +294,4 @@ func TestTimeout(t *testing.T) { _, err = seldonRestClient.Status(createTestContext(), "model", host, int32(port), nil, map[string][]string{}) g.Expect(err).ToNot(BeNil()) - g.Expect(err.Error()).To(Equal(fmt.Sprintf("Get \"http://127.0.0.1:%d/health/status\": net/http: request canceled (Client.Timeout exceeded while awaiting headers)", port))) } diff --git a/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml b/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml index 554e8dae4f..9961bc3217 100644 --- a/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml +++ b/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml @@ -19,3 +19,11 @@ rules: - list - create - update +- apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - get + - patch + - update diff --git a/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml b/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml index 68302a0c9d..8e39dd1cbf 100644 --- a/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml +++ b/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml @@ -4,6 +4,7 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/seldon-serving-cert' + controller-gen.kubebuilder.io/version: v0.2.5 creationTimestamp: null labels: app: seldon @@ -15,9 +16,11 @@ spec: group: machinelearning.seldon.io names: kind: SeldonDeployment + listKind: SeldonDeploymentList plural: seldondeployments shortNames: - sdep + singular: seldondeployment scope: Namespaced subresources: status: {} @@ -103,11 +106,19 @@ spec: type: object type: object targetAverageValue: + anyOf: + - type: integer + - type: string description: targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue. - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true targetValue: + anyOf: + - type: integer + - type: string description: targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue. - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true required: - metricName type: object @@ -115,8 +126,12 @@ spec: description: object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). properties: averageValue: + anyOf: + - type: integer + - type: string description: averageValue is the target value of the average of the metric across all relevant pods (as a quantity) - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true metricName: description: metricName is the name of the metric in question. type: string @@ -167,8 +182,12 @@ spec: - name type: object targetValue: + anyOf: + - type: integer + - type: string description: targetValue is the target value of the metric (as a quantity). - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true required: - metricName - target @@ -211,8 +230,12 @@ spec: type: object type: object targetAverageValue: + anyOf: + - type: integer + - type: string description: targetAverageValue is the target value of the average of the metric across all relevant pods (as a quantity) - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true required: - metricName - targetAverageValue @@ -228,8 +251,12 @@ spec: format: int32 type: integer targetAverageValue: + anyOf: + - type: integer + - type: string description: targetAverageValue is the target value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true required: - name type: object @@ -662,8 +689,12 @@ spec: description: 'Container name: required for volumes, optional for env vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string @@ -956,6 +987,10 @@ spec: - containerPort type: object type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' properties: @@ -1040,12 +1075,20 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object type: object @@ -1306,8 +1349,12 @@ spec: description: 'Container name: required for volumes, optional for env vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string @@ -1600,6 +1647,10 @@ spec: - containerPort type: object type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' properties: @@ -1684,12 +1735,20 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object type: object @@ -1965,12 +2024,20 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object type: object @@ -2041,8 +2108,12 @@ spec: description: 'Container name: required for volumes, optional for env vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string @@ -2335,6 +2406,10 @@ spec: - containerPort type: object type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map readinessProbe: description: 'Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' properties: @@ -2419,12 +2494,20 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object type: object @@ -2897,8 +2980,12 @@ spec: description: 'Container name: required for volumes, optional for env vars' type: string divisor: + anyOf: + - type: integer + - type: string description: Specifies the output format of the exposed resources, defaults to "1" - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true resource: description: 'Required: resource to select' type: string @@ -2930,12 +3017,20 @@ spec: properties: limits: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object requests: additionalProperties: - type: string + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' type: object type: object diff --git a/helm-charts/seldon-core-operator/templates/role_seldon-manager-cm-role.yaml b/helm-charts/seldon-core-operator/templates/role_seldon-manager-cm-role.yaml deleted file mode 100644 index d27e2d60b2..0000000000 --- a/helm-charts/seldon-core-operator/templates/role_seldon-manager-cm-role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.rbac.create }} -{{- if .Values.rbac.configmap.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - creationTimestamp: null - labels: - app: seldon - app.kubernetes.io/instance: '{{ .Release.Name }}' - app.kubernetes.io/name: '{{ include "seldon.name" . }}' - app.kubernetes.io/version: '{{ .Chart.Version }}' - name: seldon-manager-cm-role - namespace: '{{ .Release.Namespace }}' -rules: -- apiGroups: - - '' - resources: - - configmaps - verbs: - - get - - list - - watch -{{- end }} -{{- end }} diff --git a/helm-charts/seldon-core-operator/templates/rolebinding_seldon-manager-cm-rolebinding.yaml b/helm-charts/seldon-core-operator/templates/rolebinding_seldon-manager-cm-rolebinding.yaml deleted file mode 100644 index c953ccbe36..0000000000 --- a/helm-charts/seldon-core-operator/templates/rolebinding_seldon-manager-cm-rolebinding.yaml +++ /dev/null @@ -1,22 +0,0 @@ -{{- if .Values.rbac.create }} -{{- if .Values.rbac.configmap.create }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - app: seldon - app.kubernetes.io/instance: '{{ .Release.Name }}' - app.kubernetes.io/name: '{{ include "seldon.name" . }}' - app.kubernetes.io/version: '{{ .Chart.Version }}' - name: seldon-manager-cm-rolebinding - namespace: '{{ .Release.Namespace }}' -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: seldon-manager-cm-role -subjects: -- kind: ServiceAccount - name: seldon-manager - namespace: '{{ .Release.Namespace }}' -{{- end }} -{{- end }} diff --git a/helm-charts/seldon-core-operator/templates/webhook.yaml b/helm-charts/seldon-core-operator/templates/webhook.yaml index 21db0efef9..0d20b36ca8 100644 --- a/helm-charts/seldon-core-operator/templates/webhook.yaml +++ b/helm-charts/seldon-core-operator/templates/webhook.yaml @@ -5,7 +5,7 @@ --- apiVersion: admissionregistration.k8s.io/v1beta1 -kind: ValidatingWebhookConfiguration +kind: MutatingWebhookConfiguration metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/seldon-serving-cert' @@ -15,16 +15,16 @@ metadata: app.kubernetes.io/instance: '{{ .Release.Name }}' app.kubernetes.io/name: '{{ include "seldon.name" . }}' app.kubernetes.io/version: '{{ .Chart.Version }}' - name: seldon-validating-webhook-configuration-{{ .Release.Namespace }} + name: seldon-mutating-webhook-configuration-{{ .Release.Namespace }} webhooks: - clientConfig: caBundle: '{{ $ca.Cert | b64enc }}' service: name: seldon-webhook-service namespace: '{{ .Release.Namespace }}' - path: /validate-machinelearning-seldon-io-v1-seldondeployment + path: /mutate-machinelearning-seldon-io-v1-seldondeployment failurePolicy: Fail - name: v1.vseldondeployment.kb.io + name: v1.mseldondeployment.kb.io {{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }} {{- if not .Values.singleNamespace }} namespaceSelector: @@ -72,9 +72,9 @@ webhooks: service: name: seldon-webhook-service namespace: '{{ .Release.Namespace }}' - path: /validate-machinelearning-seldon-io-v1alpha2-seldondeployment + path: /mutate-machinelearning-seldon-io-v1alpha2-seldondeployment failurePolicy: Fail - name: v1alpha2.vseldondeployment.kb.io + name: v1alpha2.mseldondeployment.kb.io {{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }} {{- if not .Values.singleNamespace }} namespaceSelector: @@ -122,9 +122,9 @@ webhooks: service: name: seldon-webhook-service namespace: '{{ .Release.Namespace }}' - path: /validate-machinelearning-seldon-io-v1alpha3-seldondeployment + path: /mutate-machinelearning-seldon-io-v1alpha3-seldondeployment failurePolicy: Fail - name: v1alpha3.vseldondeployment.kb.io + name: v1alpha3.mseldondeployment.kb.io {{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }} {{- if not .Values.singleNamespace }} namespaceSelector: @@ -170,7 +170,7 @@ webhooks: --- apiVersion: admissionregistration.k8s.io/v1beta1 -kind: MutatingWebhookConfiguration +kind: ValidatingWebhookConfiguration metadata: annotations: cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/seldon-serving-cert' @@ -180,16 +180,16 @@ metadata: app.kubernetes.io/instance: '{{ .Release.Name }}' app.kubernetes.io/name: '{{ include "seldon.name" . }}' app.kubernetes.io/version: '{{ .Chart.Version }}' - name: seldon-mutating-webhook-configuration-{{ .Release.Namespace }} + name: seldon-validating-webhook-configuration-{{ .Release.Namespace }} webhooks: - clientConfig: caBundle: '{{ $ca.Cert | b64enc }}' service: name: seldon-webhook-service namespace: '{{ .Release.Namespace }}' - path: /mutate-machinelearning-seldon-io-v1-seldondeployment + path: /validate-machinelearning-seldon-io-v1-seldondeployment failurePolicy: Fail - name: v1.mseldondeployment.kb.io + name: v1.vseldondeployment.kb.io {{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }} {{- if not .Values.singleNamespace }} namespaceSelector: @@ -237,9 +237,9 @@ webhooks: service: name: seldon-webhook-service namespace: '{{ .Release.Namespace }}' - path: /mutate-machinelearning-seldon-io-v1alpha2-seldondeployment + path: /validate-machinelearning-seldon-io-v1alpha2-seldondeployment failurePolicy: Fail - name: v1alpha2.mseldondeployment.kb.io + name: v1alpha2.vseldondeployment.kb.io {{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }} {{- if not .Values.singleNamespace }} namespaceSelector: @@ -287,9 +287,9 @@ webhooks: service: name: seldon-webhook-service namespace: '{{ .Release.Namespace }}' - path: /mutate-machinelearning-seldon-io-v1alpha3-seldondeployment + path: /validate-machinelearning-seldon-io-v1alpha3-seldondeployment failurePolicy: Fail - name: v1alpha3.mseldondeployment.kb.io + name: v1alpha3.vseldondeployment.kb.io {{- if semverCompare ">=1.15.0" .Capabilities.KubeVersion.GitVersion }} {{- if not .Values.singleNamespace }} namespaceSelector: diff --git a/operator/config/lite/kustomization.yaml b/operator/config/lite/kustomization.yaml index 68a4d609b8..cd715c8e10 100644 --- a/operator/config/lite/kustomization.yaml +++ b/operator/config/lite/kustomization.yaml @@ -26,7 +26,6 @@ resources: patchesStrategicMerge: - patch_configmap.yaml -#- patch_manager_args.yaml - patch_manager_env.yaml - manager_webhook_patch.yaml diff --git a/operator/config/lite/role_webhook.yaml b/operator/config/lite/role_webhook.yaml index e7d6aa1c15..c5ea044e07 100644 --- a/operator/config/lite/role_webhook.yaml +++ b/operator/config/lite/role_webhook.yaml @@ -14,3 +14,11 @@ rules: - list - create - update +- apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - get + - patch + - update diff --git a/operator/config/rbac/kustomization.yaml b/operator/config/rbac/kustomization.yaml index 3d4ec13157..cc46c1767b 100644 --- a/operator/config/rbac/kustomization.yaml +++ b/operator/config/rbac/kustomization.yaml @@ -11,5 +11,3 @@ resources: #- auth_proxy_role_binding.yaml - role_sas.yaml - role_binding_sas.yaml -- role_cm.yaml -- role_binding_cm.yaml diff --git a/operator/config/rbac/role_binding_cm.yaml b/operator/config/rbac/role_binding_cm.yaml deleted file mode 100644 index cb331698dc..0000000000 --- a/operator/config/rbac/role_binding_cm.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: manager-cm-rolebinding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: manager-cm-role -subjects: -- kind: ServiceAccount - name: manager - namespace: system diff --git a/operator/config/rbac/role_cm.yaml b/operator/config/rbac/role_cm.yaml deleted file mode 100644 index ab4517a254..0000000000 --- a/operator/config/rbac/role_cm.yaml +++ /dev/null @@ -1,16 +0,0 @@ - ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - creationTimestamp: null - name: manager-cm-role -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch diff --git a/operator/config/webhook/kustomization.yaml b/operator/config/webhook/kustomization.yaml index 2bb1f7007f..6895def21a 100644 --- a/operator/config/webhook/kustomization.yaml +++ b/operator/config/webhook/kustomization.yaml @@ -5,7 +5,7 @@ resources: configurations: - kustomizeconfig.yaml -# Comment this if you have a k8s cluster < 1.15 and want to use namespaced or labelled operators +# Comment this if you have a k8s cluster < 1.15 as objectSelector is only available in >=1.15 patchesJson6902: - target: group: admissionregistration.k8s.io diff --git a/operator/main.go b/operator/main.go index 3fcacf1840..4a791fdd73 100644 --- a/operator/main.go +++ b/operator/main.go @@ -86,7 +86,7 @@ func main() { if createResources { setupLog.Info("Intializing operator") - err := k8sutils.InitializeOperator(config, operatorNamespace, setupLog, scheme) + err := k8sutils.InitializeOperator(config, operatorNamespace, setupLog, scheme, namespace != "") if err != nil { setupLog.Error(err, "unable to initialise operator") os.Exit(1) diff --git a/operator/seldon-operator/Makefile b/operator/seldon-operator/Makefile index 4b988325e9..40ff4f45fe 100644 --- a/operator/seldon-operator/Makefile +++ b/operator/seldon-operator/Makefile @@ -1,5 +1,6 @@ -generated: +.PHONY: recreate-generated +recreate-generated: rm -rf generated mkdir generated kustomize build ../config/lite -o generated @@ -7,18 +8,22 @@ generated: deploy/operator.yaml: generated python hack/create_resources.py --input generated --output deploy -clean_1.0.2: - rm -f deploy/olm-catalog/seldon-operator/1.0.2/seldon-operator.v1.0.2.clusterserviceversion.yaml - +# DO NOT RUN - used during development and can be used for next version deploy/olm-catalog/seldon-operator/1.0.2/seldon-operator.v1.0.2.clusterserviceversion.yaml: operator-sdk generate csv --csv-version 1.0.2 --from-version 0.1.5 +# DO NOT RUN - used during development and can be used for next version .PHONY: clean_1.1.0 clean_1.1.0: rm -f deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +# DO NOT RUN - used during development and can be used for next version deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml: - operator-sdk generate csv --csv-version 1.1.0 --from-version 1.0.2 --update-crds + operator-sdk generate csv --csv-version 1.1.0 --from-version 1.0.0 --update-crds + +# +# TESTS +# scorecard: operator-sdk scorecard -o text --bundle deploy/olm-catalog/seldon-operator --kubeconfig ~/.kube/config @@ -27,5 +32,6 @@ operator-courier_ui_validate: operator-courier verify --ui_validate_io deploy/olm-catalog/seldon-operator # See https://github.com/operator-framework/community-operators/blob/master/docs/testing-operators.md +# Used to push bundle to quay.io for testing operator-courier_push: operator-courier push deploy/olm-catalog/seldon-operator seldon seldon-operator 1.1.0 "$$QUAY_TOKEN" diff --git a/operator/seldon-operator/deploy/cluster_role.yaml b/operator/seldon-operator/deploy/cluster_role.yaml index e912ead5c9..d008d127a7 100644 --- a/operator/seldon-operator/deploy/cluster_role.yaml +++ b/operator/seldon-operator/deploy/cluster_role.yaml @@ -43,6 +43,14 @@ rules: - list - create - update +- apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - get + - patch + - update - apiGroups: - '' resources: diff --git a/operator/seldon-operator/deploy/namespace_role.yaml b/operator/seldon-operator/deploy/namespace_role.yaml index 6ade94066b..d2a09247ec 100644 --- a/operator/seldon-operator/deploy/namespace_role.yaml +++ b/operator/seldon-operator/deploy/namespace_role.yaml @@ -35,11 +35,3 @@ rules: - events verbs: - create -- apiGroups: - - '' - resources: - - configmaps - verbs: - - get - - list - - watch diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index 6e233e8f76..30fefdf19c 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -50,7 +50,7 @@ metadata: machine learning systems through the Seldon Engine. Once installed, the Seldon Operator provides multiple functions which facilitate the productisation, monitoring and maintenance of machine learning systems at scale. - repository: https://github.com/SeldonIO/seldon-operator + repository: https://github.com/SeldonIO/seldon-core support: Clive Cox name: seldon-operator.v1.1.0 namespace: seldon-operator-system @@ -159,6 +159,14 @@ spec: - list - create - update + - apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - get + - patch + - update - apiGroups: - "" resources: @@ -402,6 +410,7 @@ spec: - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default image: seldonio/seldon-core-operator:1.0.3-SNAPSHOT + imagePullPolicy: Always name: manager ports: - containerPort: 443 @@ -444,14 +453,6 @@ spec: - events verbs: - create - - apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch serviceAccountName: seldon-manager strategy: deployment installModes: @@ -484,7 +485,7 @@ spec: minKubeVersion: 1.13.0 provider: name: Seldon Technologies - replaces: seldonoperator.v0.1.5 + replaces: seldon-operator.v1.0.0 selector: matchLabels: name: seldon-operator diff --git a/operator/seldon-operator/deploy/role.yaml b/operator/seldon-operator/deploy/role.yaml index 8e35e833c3..5caf5ab1e3 100644 --- a/operator/seldon-operator/deploy/role.yaml +++ b/operator/seldon-operator/deploy/role.yaml @@ -43,6 +43,14 @@ rules: - list - create - update +- apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - get + - patch + - update - apiGroups: - '' resources: @@ -225,11 +233,3 @@ rules: - events verbs: - create -- apiGroups: - - '' - resources: - - configmaps - verbs: - - get - - list - - watch diff --git a/operator/seldon-operator/testing/openshift/README.md b/operator/seldon-operator/testing/openshift/README.md new file mode 100644 index 0000000000..8ee06d5eee --- /dev/null +++ b/operator/seldon-operator/testing/openshift/README.md @@ -0,0 +1,4 @@ +# Test on Openshift + +Follow https://github.com/operator-framework/community-operators/blob/master/docs/testing-operators.md#testing-operator-deployment-on-openshift + diff --git a/operator/seldon-operator/testing/openshift/operator-source.yaml b/operator/seldon-operator/testing/openshift/operator-source.yaml new file mode 100644 index 0000000000..c6bb7df4c1 --- /dev/null +++ b/operator/seldon-operator/testing/openshift/operator-source.yaml @@ -0,0 +1,11 @@ +apiVersion: operators.coreos.com/v1 +kind: OperatorSource +metadata: + name: seldon-operators + namespace: openshift-marketplace +spec: + type: appregistry + endpoint: https://quay.io/cnr + registryNamespace: seldon + displayName: "Seldon Core Testing" + publisher: "Seldon" diff --git a/operator/seldon-operator/testing/standalone/create_standalone_namespace.sh b/operator/seldon-operator/testing/standalone/create_standalone_namespace.sh new file mode 100755 index 0000000000..301c309d52 --- /dev/null +++ b/operator/seldon-operator/testing/standalone/create_standalone_namespace.sh @@ -0,0 +1,9 @@ +DEPLOY=../../deploy +kubectl create -f ${DEPLOY}/cluster_role.yaml +kubectl create -f ${DEPLOY}/role_binding.yaml +kubectl create -f ${DEPLOY}/namespace_role.yaml +kubectl create -f ${DEPLOY}/namespace_role_binding.yaml +kubectl create -f ${DEPLOY}/service_account.yaml +kubectl create -f ${DEPLOY}/crds/machinelearning.seldon.io_seldondeployment_crd.yaml +cat ${DEPLOY}/operator.yaml | tr '\n' '\f' | sed -e "s/ - name: WATCH_NAMESPACE\f value: ''/ - name: WATCH_NAMESPACE\f value: 'default'"/ | tr '\f' '\n' | kubectl create -f - + diff --git a/operator/utils/k8s/initializer.go b/operator/utils/k8s/initializer.go index 514cea3b5c..2010f7fbb8 100644 --- a/operator/utils/k8s/initializer.go +++ b/operator/utils/k8s/initializer.go @@ -38,7 +38,7 @@ func findMyDeployment(clientset kubernetes.Interface, namespace string) (*appsv1 return client.Get(ManagerDeploymentName, v1.GetOptions{}) } -func InitializeOperator(config *rest.Config, namespace string, logger logr.Logger, scheme *runtime.Scheme) error { +func InitializeOperator(config *rest.Config, namespace string, logger logr.Logger, scheme *runtime.Scheme, watchNamespace bool) error { clientset, err := kubernetes.NewForConfig(config) if err != nil { @@ -69,7 +69,7 @@ func InitializeOperator(config *rest.Config, namespace string, logger logr.Logge if err != nil { return err } - err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, namespace, dep) + err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, namespace, dep, watchNamespace) if err != nil { return err } @@ -79,7 +79,7 @@ func InitializeOperator(config *rest.Config, namespace string, logger logr.Logge if err != nil { return err } - err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, namespace, dep) + err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, namespace, dep, watchNamespace) if err != nil { return err } diff --git a/operator/utils/k8s/webhook.go b/operator/utils/k8s/webhook.go index a82b40cbfe..7ba34e605b 100644 --- a/operator/utils/k8s/webhook.go +++ b/operator/utils/k8s/webhook.go @@ -12,6 +12,7 @@ import ( "k8s.io/client-go/kubernetes" ctrl "sigs.k8s.io/controller-runtime" "strconv" + "strings" ) type WebhookCreator struct { @@ -31,13 +32,21 @@ func NewWebhookCreator(client kubernetes.Interface, certs *Cert, logger logr.Log logger.Info("Server version", "Major", serverVersion.Major, "Minor", serverVersion.Minor) majorVersion, err := strconv.Atoi(serverVersion.Major) if err != nil { - logger.Error(err, "Failed to parse majorVersion defaulting to 0") - majorVersion = 0 + logger.Error(err, "Failed to parse majorVersion defaulting to 1") + majorVersion = 1 } minorVersion, err := strconv.Atoi(serverVersion.Minor) if err != nil { - logger.Error(err, "Failed to parse minorVersion defaulting to 0") - minorVersion = 0 + if strings.HasSuffix(serverVersion.Minor, "+") { + minorVersion, err = strconv.Atoi(serverVersion.Minor[0 : len(serverVersion.Minor)-1]) + if err != nil { + logger.Error(err, "Failed to parse minorVersion defaulting to 12") + minorVersion = 12 + } + } else { + logger.Error(err, "Failed to parse minorVersion defaulting to 12") + minorVersion = 12 + } } return &WebhookCreator{ clientset: client, @@ -49,7 +58,7 @@ func NewWebhookCreator(client kubernetes.Interface, certs *Cert, logger logr.Log }, nil } -func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment) error { +func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment, watchNamespace bool) error { mwc := v1beta1.MutatingWebhookConfiguration{} err := yaml.Unmarshal(rawYaml, &mwc) if err != nil { @@ -63,8 +72,15 @@ func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []b mwc.Webhooks[idx].ClientConfig.Service.Namespace = namespace //Remove selector if version too low if wc.majorVersion == 1 && wc.minorVersion < 15 { + //mwc.Webhooks[idx].ObjectSelector = nil + } + + //Remove namespace exclusion if watchNamespace + //TODO change to add a namespace selector if the initalizer adds a label to namespace + if watchNamespace { mwc.Webhooks[idx].NamespaceSelector = nil } + } // add ownership @@ -89,7 +105,7 @@ func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []b return err } -func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment) error { +func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment, watchNamespace bool) error { vwc := v1beta1.ValidatingWebhookConfiguration{} err := yaml.Unmarshal(rawYaml, &vwc) if err != nil { @@ -101,6 +117,11 @@ func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml [ // set namespace vwc.Webhooks[idx].ClientConfig.Service.Namespace = namespace + //Remove namespace exclusion if watchNamespace + //TODO change to add a namespace selector if the initalizer adds a label to namespace + if watchNamespace { + vwc.Webhooks[idx].NamespaceSelector = nil + } } // add ownership diff --git a/operator/utils/k8s/webhook_test.go b/operator/utils/k8s/webhook_test.go index b6780bc0eb..ff5eafad18 100644 --- a/operator/utils/k8s/webhook_test.go +++ b/operator/utils/k8s/webhook_test.go @@ -79,7 +79,7 @@ func TestMutatingWebhookCreate(t *testing.T) { g.Expect(err).To(BeNil()) wc, err := NewWebhookCreator(client, certs, ctrl.Log, scheme) g.Expect(err).To(BeNil()) - err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, TestNamespace, dep) + err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, TestNamespace, dep, false) g.Expect(err).To(BeNil()) } @@ -96,7 +96,7 @@ func TestValidatingWebhookCreate(t *testing.T) { g.Expect(err).To(BeNil()) wc, err := NewWebhookCreator(client, certs, ctrl.Log, scheme) g.Expect(err).To(BeNil()) - err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, TestNamespace, dep) + err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, TestNamespace, dep, false) g.Expect(err).To(BeNil()) } From 6da2682c254419c1ef6650b639346e8e70bc2d78 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Mon, 9 Mar 2020 14:46:57 +0000 Subject: [PATCH 09/34] Add Redhat Dockerfiles for operator and executor --- executor/Dockerfile.redhat | 34 ++++++++++++++++++++++++++++++++++ executor/Makefile | 12 +++++++++++- operator/Dockerfile.redhat | 38 ++++++++++++++++++++++++++++++++++++++ operator/Makefile | 14 ++++++++++++++ 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 executor/Dockerfile.redhat create mode 100644 operator/Dockerfile.redhat diff --git a/executor/Dockerfile.redhat b/executor/Dockerfile.redhat new file mode 100644 index 0000000000..4622d022df --- /dev/null +++ b/executor/Dockerfile.redhat @@ -0,0 +1,34 @@ +# Build the manager binary +FROM golang:1.13 as builder + +WORKDIR /workspace +# Copy the Go Modules manifests +COPY go.mod go.mod +COPY go.sum go.sum +COPY proto/ proto/ +# cache deps before building and copying source so that we don't need to re-download as much +# and so that source changes don't invalidate our downloaded layer +RUN go mod download + +# Copy the go source +COPY main.go main.go +COPY api/ api/ +COPY predictor/ predictor/ +COPY logger/ logger/ +COPY k8s/ k8s/ + +# Build +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o executor main.go + +FROM registry.access.redhat.com/ubi8/ubi-minimal +LABEL name="Seldon Executor" \ + vendor="Seldon Technologies" \ + version="v1.1.0" \ + release="1" \ + summary="The service orchestrator for Seldon Core" \ + description="The service orchestrator for Seldon Core which manages the request/response flow through the Seldon Core inference graphs deployed via the Seldon Core Operator as SeldonDeployments custom resources" + +WORKDIR / +COPY --from=builder /workspace/executor . +COPY licenses/license.txt . +ENTRYPOINT ["/executor"] diff --git a/executor/Makefile b/executor/Makefile index 9fc222c934..2a4c2d36ad 100644 --- a/executor/Makefile +++ b/executor/Makefile @@ -1,7 +1,7 @@ VERSION := $(shell cat ../version.txt) # Image URL to use all building/pushing image targets IMG ?= seldonio/seldon-core-executor:${VERSION} - +IMG_REDHAT ?= seldonio/seldon-core-executor-ubi8:${VERSION} # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -57,14 +57,24 @@ test: fmt vet docker-build: test docker build . -t ${IMG} +# Build the docker image for Redhat +docker-build-redhat: test + docker build . -f Dockerfile.redhat -t ${IMG_REDHAT} + # Push the docker image docker-push: docker push ${IMG} +# Push the docker image +docker-push-redhat: + docker push ${IMG_REDHAT} kind-image-install: docker-build kind load -v 3 docker-image ${IMG} +kind-image-install-redhat: docker-build-redhat + kind load -v 3 docker-image ${IMG_REDHAT} + .PHONY: clean clean: diff --git a/operator/Dockerfile.redhat b/operator/Dockerfile.redhat new file mode 100644 index 0000000000..5c03399b4a --- /dev/null +++ b/operator/Dockerfile.redhat @@ -0,0 +1,38 @@ +# Build the manager binary +FROM golang:1.12.5 as builder + +WORKDIR /workspace +# Copy the Go Modules manifests +COPY go.mod go.mod +COPY go.sum go.sum +# cache deps before building and copying source so that we don't need to re-download as much +# and so that source changes don't invalidate our downloaded layer +RUN go mod download + +# Copy the go source +COPY main.go main.go +COPY apis/ apis/ +COPY controllers/ controllers/ +COPY utils/ utils/ +COPY constants/ constants/ +COPY client/ client/ + +# Build +RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go + +FROM registry.access.redhat.com/ubi8/ubi-minimal +LABEL name="Seldon Operator" \ + vendor="Seldon Technologies" \ + version="v1.1.0" \ + release="1" \ + summary="An Operator to deploy, monitor, explain and manage production machine learning models at scale." \ + description="The Seldon operator for management, monitoring and operations of machine learning systems through the Seldon Engine. Once installed, the Seldon Operator provides multiple functions which facilitate the productisation, monitoring and maintenance of machine learning systems at scale." + +WORKDIR / +COPY --from=builder /workspace/manager . +COPY licenses/license.txt . +COPY generated/admissionregistration.k8s.io_v1beta1_mutatingwebhookconfiguration_seldon-mutating-webhook-configuration.yaml /tmp/operator-resources/mutate.yaml +COPY generated/admissionregistration.k8s.io_v1beta1_validatingwebhookconfiguration_seldon-validating-webhook-configuration.yaml /tmp/operator-resources/validate.yaml +COPY generated/~g_v1_service_seldon-webhook-service.yaml /tmp/operator-resources/service.yaml +COPY generated/~g_v1_configmap_seldon-config.yaml /tmp/operator-resources/configmap.yaml +ENTRYPOINT ["/manager"] diff --git a/operator/Makefile b/operator/Makefile index 2c6db0c435..56305c9f6a 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -1,6 +1,7 @@ VERSION := $(shell cat ../version.txt) # Image URL to use all building/pushing image targets IMG ?= seldonio/seldon-core-operator:${VERSION} +IMG_REDHAT ?= seldonio/seldon-core-operator-ubi8:${VERSION} # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true" @@ -119,15 +120,28 @@ create-client: test docker-build: test generate-resources docker build . -t ${IMG} +# Build the docker image for Redhat +docker-build-redhat: test generate-resources + docker build . -f Dockerfile.redhat -t ${IMG_REDHAT} + + # Push the docker image docker-push: docker push ${IMG} +# Push the docker image +docker-push-redhat: + docker push ${IMG_REDHAT} + kind-image-install: docker-build docker save ${IMG} > operator.tar kind load image-archive operator.tar +kind-image-install-redhat: docker-build-redhat + docker save ${IMG_REDHAT} > operator.tar + kind load image-archive operator.tar + # find or download controller-gen # download controller-gen if necessary controller-gen: From 3b34e38759d9204038a8d4e0d8d493a9c5b31adc Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Tue, 10 Mar 2020 13:46:38 +0000 Subject: [PATCH 10/34] engine redhat docker files --- engine/Dockerfile | 5 ----- engine/Dockerfile.redhat | 26 ++++++++++++++++++++++++++ engine/Makefile | 25 +++++++++++++------------ 3 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 engine/Dockerfile.redhat diff --git a/engine/Dockerfile b/engine/Dockerfile index 88ce0d29fe..90ff36cd8c 100644 --- a/engine/Dockerfile +++ b/engine/Dockerfile @@ -10,11 +10,6 @@ RUN mvn clean verify -Dlicense.useMissingFile -B FROM openjdk:11.0.5-jre-slim -RUN \ - apt-get update -y && \ - apt-get remove -y --auto-remove && \ - apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - COPY --from=builder /workspace/target/seldon-engine-*.jar app.jar COPY --from=builder /workspace/target/generated-resources /licenses/ diff --git a/engine/Dockerfile.redhat b/engine/Dockerfile.redhat new file mode 100644 index 0000000000..705a31a1d5 --- /dev/null +++ b/engine/Dockerfile.redhat @@ -0,0 +1,26 @@ +FROM maven:3.6.3-jdk-11 as builder + +WORKDIR /workspace + +COPY pom.xml pom.xml +COPY src/ src/ + +# Build +RUN mvn clean verify -Dlicense.useMissingFile -B + +FROM registry.access.redhat.com/ubi8/ubi + +RUN yum install -y java-11-openjdk.x86_64 + +LABEL name="Seldon Engine" \ + vendor="Seldon Technologies" \ + version="v1.1.0" \ + release="1" \ + summary="The Seldon Engine that is deployed for each model to handle the data flow of each ML computational graph." \ + description="The Seldon Engine that is deployed for each model to handle the data flow of each ML computational graph." + +COPY --from=builder /workspace/target/seldon-engine-*.jar app.jar +COPY --from=builder /workspace/target/generated-resources /licenses/ + +ENTRYPOINT [ "sh", "-c", "java -Djava.security.egd=file:/dev/./urandom $JAVA_OPTS -jar app.jar" ] + diff --git a/engine/Makefile b/engine/Makefile index a560bbf01a..28cc328322 100644 --- a/engine/Makefile +++ b/engine/Makefile @@ -1,5 +1,6 @@ -IMAGE_NAME=engine VERSION := $(shell cat ../version.txt) +IMG ?= seldonio/engine:$(VERSION) +IMG_REDHAT ?= seldonio/engine-ubi8:$(VERSION) version: echo ${VERSION} @@ -8,10 +9,13 @@ build_jar: update_proto update_swagger mvn clean verify -Dlicense.useMissingFile -B build_image: update_proto update_swagger - docker build -f Dockerfile -t seldonio/$(IMAGE_NAME):$(VERSION) . + docker build -f Dockerfile -t ${IMG} . + +build_image_redhat: update_proto update_swagger + docker build -f Dockerfile.redhat -t ${IMG_REDHAT} . push_to_registry: - docker push seldonio/$(IMAGE_NAME):$(VERSION) + docker push ${IMG} clean: @mvn clean @@ -22,15 +26,6 @@ cache_dependencies: mvn -Dmaven.repo.local=./.m2 dependency:resolve mvn -Dmaven.repo.local=./.m2 verify -engine.json: engine.json.in Makefile - @cat engine.json.in | sed \ - -e "s|%ENGINE_IMAGE_VERSION%|$(ENGINE_IMAGE_VERSION)|" > $@ && echo "created $@" - -start_engine: engine.json - kubectl create -f engine.json -stop_engine: engine.json - kubectl delete --ignore-not-found=true -f engine.json - download_protos_k8s: cd ../proto/k8s ; make create_protos @@ -56,3 +51,9 @@ dependencies: update_proto cd target/site && aws s3 cp dependencies.html s3://seldon-core-docs/master/engine/dependencies/dependencies.html --acl public-read cd target/site && aws s3 cp css s3://seldon-core-docs/master/engine/dependencies/css --recursive --acl public-read cd target/site && aws s3 cp images s3://seldon-core-docs/master/engine/dependencies/images --recursive --acl public-read + +kind-image-install: build_image + kind load -v 3 docker-image ${IMG} + +kind-image-install-redhat: build_image_redhat + kind load -v 3 docker-image ${IMG_REDHAT} From 1fd2c716580ee006ddb542641056cb4865236e78 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Tue, 10 Mar 2020 19:21:04 +0000 Subject: [PATCH 11/34] Add initial redhat certification steps for operator and scafollding for executor --- executor/Makefile | 14 ++++++++++++-- operator/Dockerfile | 2 +- operator/Dockerfile.redhat | 2 +- operator/Makefile | 11 +++++++++-- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/executor/Makefile b/executor/Makefile index 2a4c2d36ad..23fb4f223a 100644 --- a/executor/Makefile +++ b/executor/Makefile @@ -1,7 +1,10 @@ VERSION := $(shell cat ../version.txt) # Image URL to use all building/pushing image targets -IMG ?= seldonio/seldon-core-executor:${VERSION} -IMG_REDHAT ?= seldonio/seldon-core-executor-ubi8:${VERSION} +IMAGE_NAME_BASE=seldon-core-executor +IMG ?= seldonio/${IMAGE_NAME_BASE}:${VERSION} +IMG_VERSION_REDHAT ?= ${IMAGE_NAME_BASE}-ubi8:${VERSION} +IMG_REDHAT ?= seldonio/${IMG_VERSION_REDHAT} + # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) GOBIN=$(shell go env GOPATH)/bin @@ -69,6 +72,13 @@ docker-push: docker-push-redhat: docker push ${IMG_REDHAT} +# password can be found at: https://connect.redhat.com/project/1074021/view +# TODO update to correct project +#redhat-image-scan: +# docker login -u unused scan.connect.redhat.com +# docker tag ${IMG_REDHAT} scan.connect.redhat.com/ospid-82f819a9-f40d-4d59-b67c-136491f22cfb/${IMG_VERSION_REDHAT} +# docker push scan.connect.redhat.com/ospid-82f819a9-f40d-4d59-b67c-136491f22cfb/${IMG_VERSION_REDHAT} + kind-image-install: docker-build kind load -v 3 docker-image ${IMG} diff --git a/operator/Dockerfile b/operator/Dockerfile index 1b5f1f87bf..6877f81690 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -25,7 +25,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager FROM gcr.io/distroless/static:latest WORKDIR / COPY --from=builder /workspace/manager . -COPY licenses/license.txt . +COPY licenses/license.txt licenses/license.txt COPY generated/admissionregistration.k8s.io_v1beta1_mutatingwebhookconfiguration_seldon-mutating-webhook-configuration.yaml /tmp/operator-resources/mutate.yaml COPY generated/admissionregistration.k8s.io_v1beta1_validatingwebhookconfiguration_seldon-validating-webhook-configuration.yaml /tmp/operator-resources/validate.yaml COPY generated/~g_v1_service_seldon-webhook-service.yaml /tmp/operator-resources/service.yaml diff --git a/operator/Dockerfile.redhat b/operator/Dockerfile.redhat index 5c03399b4a..5a22d5991d 100644 --- a/operator/Dockerfile.redhat +++ b/operator/Dockerfile.redhat @@ -30,7 +30,7 @@ LABEL name="Seldon Operator" \ WORKDIR / COPY --from=builder /workspace/manager . -COPY licenses/license.txt . +COPY licenses/license.txt licenses/license.txt COPY generated/admissionregistration.k8s.io_v1beta1_mutatingwebhookconfiguration_seldon-mutating-webhook-configuration.yaml /tmp/operator-resources/mutate.yaml COPY generated/admissionregistration.k8s.io_v1beta1_validatingwebhookconfiguration_seldon-validating-webhook-configuration.yaml /tmp/operator-resources/validate.yaml COPY generated/~g_v1_service_seldon-webhook-service.yaml /tmp/operator-resources/service.yaml diff --git a/operator/Makefile b/operator/Makefile index 56305c9f6a..f8a9414be8 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -1,7 +1,9 @@ VERSION := $(shell cat ../version.txt) # Image URL to use all building/pushing image targets -IMG ?= seldonio/seldon-core-operator:${VERSION} -IMG_REDHAT ?= seldonio/seldon-core-operator-ubi8:${VERSION} +IMAGE_NAME_BASE=seldon-core-operator +IMG ?= seldonio/${IMAGE_NAME_BASE}:${VERSION} +IMG_VERSION_REDHAT ?= ${IMAGE_NAME_BASE}-ubi8:${VERSION} +IMG_REDHAT ?= seldonio/${IMG_VERSION_REDHAT} # Produce CRDs that work back to Kubernetes 1.11 (no version conversion) CRD_OPTIONS ?= "crd:trivialVersions=true" @@ -133,6 +135,11 @@ docker-push: docker-push-redhat: docker push ${IMG_REDHAT} +# password can be found at: https://connect.redhat.com/project/1074021/view +redhat-image-scan: + docker login -u unused scan.connect.redhat.com + docker tag ${IMG_REDHAT} scan.connect.redhat.com/ospid-82f819a9-f40d-4d59-b67c-136491f22cfb/${IMG_VERSION_REDHAT} + docker push scan.connect.redhat.com/ospid-82f819a9-f40d-4d59-b67c-136491f22cfb/${IMG_VERSION_REDHAT} kind-image-install: docker-build docker save ${IMG} > operator.tar From 9530492d23643ce8cd03de4674debec9056f1228 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Wed, 11 Mar 2020 14:01:57 +0000 Subject: [PATCH 12/34] update to add ownership to crd --- ...deployments.machinelearning.seldon.io.yaml | 1210 ++++++++++++++++- .../deployment_seldon-controller-manager.yaml | 4 +- operator/go.mod | 3 +- operator/go.sum | 1 + operator/utils/k8s/initializer.go | 22 +- operator/utils/k8s/webhook.go | 5 +- operator/utils/k8s/webhook_test.go | 40 +- python/Makefile | 2 +- 8 files changed, 1213 insertions(+), 74 deletions(-) diff --git a/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml b/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml index 8e39dd1cbf..0501d550d9 100644 --- a/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml +++ b/helm-charts/seldon-core-operator/templates/customresourcedefinition_seldondeployments.machinelearning.seldon.io.yaml @@ -29,10 +29,10 @@ spec: description: SeldonDeployment is the Schema for the seldondeployments API properties: apiVersion: - description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: - description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object @@ -172,7 +172,7 @@ spec: description: API version of the referent type: string kind: - description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"' + description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"' type: string name: description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' @@ -665,13 +665,13 @@ spec: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or it's key must be defined + description: Specify whether the ConfigMap or its key must be defined type: boolean required: - key type: object fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.' + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". @@ -711,7 +711,7 @@ spec: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the Secret or it's key must be defined + description: Specify whether the Secret or its key must be defined type: boolean required: - key @@ -820,7 +820,7 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' properties: exec: description: One and only one of the following should be specified. Exec specifies the action to take. @@ -938,7 +938,7 @@ spec: format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -1050,7 +1050,7 @@ spec: format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -1150,6 +1150,845 @@ spec: description: User is a SELinux user label that applies to the container. type: string type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + stdin: + description: Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which the container''s termination message will be written is mounted into the container''s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume within a container. + properties: + mountPath: + description: Path within the container at which the volume should be mounted. Must not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + type: boolean + subPath: + description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + dnsConfig: + description: Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. + properties: + nameservers: + description: A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. + items: + type: string + type: array + options: + description: A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver options of a pod. + properties: + name: + description: Required. + type: string + value: + type: string + type: object + type: array + searches: + description: A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + items: + type: string + type: array + type: object + dnsPolicy: + description: Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: 'EnableServiceLinks indicates whether information about services should be injected into pod''s environment variables, matching the syntax of Docker links. Optional: Defaults to true.' + type: boolean + ephemeralContainers: + description: List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. This field is alpha-level and is only honored by servers that enable the EphemeralContainers feature. + items: + description: An EphemeralContainer is a container that may be added temporarily to an existing pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a pod is removed or restarted. If an ephemeral container causes a pod to exceed its resource allocation, the pod may be evicted. Ephemeral containers may not be added by directly updating the pod spec. They must be added via the pod's ephemeralcontainers subresource, and they will appear in the pod spec once added. This is an alpha feature enabled by the EphemeralContainers feature flag. + properties: + args: + description: 'Arguments to the entrypoint. The docker image''s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container''s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a shell. The docker image''s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container''s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the container. Cannot be updated. + items: + description: EnvVar represents an environment variable present in a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret must be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Lifecycle is not allowed for ephemeral containers. + properties: + postStart: + description: 'PostStart is called immediately after a container is created. If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: Probes are not allowed for ephemeral containers. + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers. + type: string + ports: + description: Ports are not allowed for ephemeral containers. + items: + description: ContainerPort represents a network port in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's IP address. This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port to. + type: string + hostPort: + description: Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: Probes are not allowed for ephemeral containers. + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources already allocated to the pod. + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: SecurityContext is not allowed for ephemeral containers. + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that applies to the container. + type: string + role: + description: Role is a SELinux role label that applies to the container. + type: string + type: + description: Type is a SELinux type label that applies to the container. + type: string + user: + description: User is a SELinux user label that applies to the container. + type: string + type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: Probes are not allowed for ephemeral containers. + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object stdin: description: Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. @@ -1157,6 +1996,9 @@ spec: stdinOnce: description: Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false type: boolean + targetContainerName: + description: If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container is run in whatever namespaces are shared for the pod. Note that the container runtime must support this feature. + type: string terminationMessagePath: description: 'Optional: Path at which the file to which the container''s termination message will be written is mounted into the container''s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated.' type: string @@ -1203,7 +2045,7 @@ spec: description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). type: string subPathExpr: - description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is alpha in 1.14. + description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. type: string required: - mountPath @@ -1217,38 +2059,6 @@ spec: - name type: object type: array - dnsConfig: - description: Specifies the DNS parameters of a pod. Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy. - properties: - nameservers: - description: A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. - items: - type: string - type: array - options: - description: A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options of a pod. - properties: - name: - description: Required. - type: string - value: - type: string - type: object - type: array - searches: - description: A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. - items: - type: string - type: array - type: object - dnsPolicy: - description: Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or 'None'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to 'ClusterFirstWithHostNet'. - type: string - enableServiceLinks: - description: 'EnableServiceLinks indicates whether information about services should be injected into pod''s environment variables, matching the syntax of Docker links. Optional: Defaults to true.' - type: boolean hostAliases: description: HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts file if specified. This is only valid for non-hostNetwork pods. items: @@ -1287,7 +2097,7 @@ spec: type: object type: array initContainers: - description: 'List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, or Liveness probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + description: 'List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' items: description: A single application container that you want to run within a pod. properties: @@ -1325,13 +2135,13 @@ spec: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or it's key must be defined + description: Specify whether the ConfigMap or its key must be defined type: boolean required: - key type: object fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.' + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". @@ -1371,7 +2181,7 @@ spec: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the Secret or it's key must be defined + description: Specify whether the Secret or its key must be defined type: boolean required: - key @@ -1480,7 +2290,7 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' properties: exec: description: One and only one of the following should be specified. Exec specifies the action to take. @@ -1598,7 +2408,7 @@ spec: format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -1710,7 +2520,7 @@ spec: format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -1810,6 +2620,104 @@ spec: description: User is a SELinux user label that applies to the container. type: string type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object stdin: description: Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. @@ -1863,7 +2771,7 @@ spec: description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). type: string subPathExpr: - description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is alpha in 1.14. + description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. type: string required: - mountPath @@ -1885,6 +2793,18 @@ spec: type: string description: 'NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node''s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: 'Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.16, and is only honored by servers that enable the PodOverhead feature.' + type: object + preemptionPolicy: + description: PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. This field is alpha-level and is only honored by servers that enable the NonPreemptingPriority feature. + type: string priority: description: The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. format: int32 @@ -1908,7 +2828,7 @@ spec: description: 'Restart policy for all containers within the pod. One of Always, OnFailure, Never. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' type: string runtimeClassName: - description: 'RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is an alpha feature and may change in the future.' + description: 'RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md This is a beta feature as of Kubernetes v1.14.' type: string schedulerName: description: If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. @@ -1969,6 +2889,19 @@ spec: - value type: object type: array + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object type: object serviceAccount: description: 'DeprecatedServiceAccount is a depreciated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead.' @@ -1977,7 +2910,7 @@ spec: description: 'ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' type: string shareProcessNamespace: - description: 'Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. This field is beta-level and may be disabled with the PodShareProcessNamespace feature.' + description: 'Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false.' type: boolean subdomain: description: If specified, the fully qualified Pod hostname will be "...svc.". If not specified, the pod will not have a domainname at all. @@ -2009,6 +2942,61 @@ spec: type: string type: object type: array + topologySpreadConstraints: + description: TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. This field is alpha-level and is only honored by clusters that enables the EvenPodsSpread feature. All topologySpreadConstraints are ANDed. + items: + description: TopologySpreadConstraint specifies how to spread matching pods among the given topology. + properties: + labelSelector: + description: LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label selector requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. + properties: + key: + description: key is the label key that the selector applies to. + type: string + operator: + description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + maxSkew: + description: 'MaxSkew describes the degree to which pods may be unevenly distributed. It''s the maximum permitted difference between the number of matching pods in any two topology domains of a given topology type. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 1/1/0: | zone1 | zone2 | zone3 | | P | P | | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 1/1/1; scheduling it onto zone1(zone2) would make the ActualSkew(2-0) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. It''s a required field. Default value is 1 and 0 is not allowed.' + format: int32 + type: integer + topologyKey: + description: TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a "bucket", and try to put balanced number of pods into each bucket. It's a required field. + type: string + whenUnsatisfiable: + description: 'WhenUnsatisfiable indicates how to deal with a pod if it doesn''t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it - ScheduleAnyway tells the scheduler to still schedule it It''s considered as "Unsatisfiable" if and only if placing incoming pod on any topology violates "MaxSkew". For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won''t make it *more* imbalanced. It''s a required field.' + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map volumes: description: 'List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' items: @@ -2084,13 +3072,13 @@ spec: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or it's key must be defined + description: Specify whether the ConfigMap or its key must be defined type: boolean required: - key type: object fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.' + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". @@ -2130,7 +3118,7 @@ spec: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the Secret or it's key must be defined + description: Specify whether the Secret or its key must be defined type: boolean required: - key @@ -2239,7 +3227,7 @@ spec: type: object type: object preStop: - description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + description: 'PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. The handler is not called if the container crashes or exits. The reason for termination is passed to the handler. The Pod''s termination grace period countdown begins before the PreStop hooked is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod''s termination grace period. Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' properties: exec: description: One and only one of the following should be specified. Exec specifies the action to take. @@ -2357,7 +3345,7 @@ spec: format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -2469,7 +3457,7 @@ spec: format: int32 type: integer successThreshold: - description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness. Minimum value is 1. + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. format: int32 type: integer tcpSocket: @@ -2569,6 +3557,104 @@ spec: description: User is a SELinux user label that applies to the container. type: string type: object + windowsOptions: + description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + properties: + gmsaCredentialSpec: + description: GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name of the GMSA credential spec to use. This field is alpha-level and is only honored by servers that enable the WindowsGMSA feature flag. + type: string + runAsUserName: + description: The UserName in Windows to run the entrypoint of the container process. Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. This field is beta-level and may be disabled with the WindowsRunAsUserName feature flag. + type: string + type: object + type: object + startupProbe: + description: 'StartupProbe indicates that the Pod has successfully initialized. If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod''s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. This is an alpha feature enabled by the StartupProbe feature flag. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to perform. + properties: + host: + description: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported TODO: implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer type: object stdin: description: Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. @@ -2622,7 +3708,7 @@ spec: description: Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root). type: string subPathExpr: - description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. This field is alpha in 1.14. + description: Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to "" (volume's root). SubPathExpr and SubPath are mutually exclusive. type: string required: - mountPath @@ -2956,13 +4042,13 @@ spec: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or it's key must be defined + description: Specify whether the ConfigMap or its key must be defined type: boolean required: - key type: object fieldRef: - description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP.' + description: 'Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels, metadata.annotations, spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.' properties: apiVersion: description: Version of the schema the FieldPath is written in terms of, defaults to "v1". @@ -3002,7 +4088,7 @@ spec: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the Secret or it's key must be defined + description: Specify whether the Secret or its key must be defined type: boolean required: - key diff --git a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml index a30fbaaa31..d0cd78a0e7 100644 --- a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml +++ b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml @@ -79,6 +79,8 @@ spec: value: '{{ .Values.istio.tlsMode }}' - name: USE_EXECUTOR value: '{{ .Values.executor.enabled }}' + - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT + value: '' - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION value: '{{ .Values.executor.image.registry }}/{{ .Values.executor.image.repository }}:{{ .Values.executor.image.tag }}' - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY @@ -93,8 +95,6 @@ spec: value: '{{ .Values.executor.user }}' - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: '{{ .Values.executor.serviceAccount.name }}' - - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX - value: '{{ .Values.executor.defaultRequestLoggerEndpointPrefix }}' image: '{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}' imagePullPolicy: '{{ .Values.image.pullPolicy }}' name: manager diff --git a/operator/go.mod b/operator/go.mod index 672094e441..6b52d56ed8 100644 --- a/operator/go.mod +++ b/operator/go.mod @@ -5,7 +5,7 @@ go 1.13 require ( github.com/Azure/go-autorest/autorest v0.9.2 // indirect github.com/Azure/go-autorest/autorest/adal v0.7.0 // indirect - github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680 + github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v0.1.0 github.com/gogo/protobuf v1.3.1 github.com/gomodules/jsonpatch v2.1.0+incompatible // indirect @@ -17,6 +17,7 @@ require ( istio.io/api v0.0.0-20200305220354-742c3015842e istio.io/client-go v0.0.0-20200305195406-fddfc7a9ca06 k8s.io/api v0.17.2 + k8s.io/apiextensions-apiserver v0.17.2 k8s.io/apimachinery v0.17.2 k8s.io/client-go v0.17.2 knative.dev/pkg v0.0.0-20200306225627-d1665814487e diff --git a/operator/go.sum b/operator/go.sum index b6090aec11..ab1df98f08 100644 --- a/operator/go.sum +++ b/operator/go.sum @@ -79,6 +79,7 @@ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680 h1:ZktWZesgun21uEDrwW7iEV1zPCGQldM2atlJZ3TdvVM= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= diff --git a/operator/utils/k8s/initializer.go b/operator/utils/k8s/initializer.go index 2010f7fbb8..3d0c2050db 100644 --- a/operator/utils/k8s/initializer.go +++ b/operator/utils/k8s/initializer.go @@ -5,6 +5,8 @@ import ( "github.com/go-logr/logr" "io/ioutil" appsv1 "k8s.io/api/apps/v1" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/kubernetes" @@ -26,6 +28,7 @@ const ( ServiceFilename = "service.yaml" ManagerDeploymentName = "seldon-controller-manager" + CRDName = "seldondeployments.machinelearning.seldon.io" ) func LoadBytesFromFile(path string, name string) ([]byte, error) { @@ -38,8 +41,23 @@ func findMyDeployment(clientset kubernetes.Interface, namespace string) (*appsv1 return client.Get(ManagerDeploymentName, v1.GetOptions{}) } +func findCRD(clientset apiextensionsclient.Interface) (*v1beta1.CustomResourceDefinition, error) { + client := clientset.ApiextensionsV1beta1().CustomResourceDefinitions() + return client.Get(CRDName, v1.GetOptions{}) +} + func InitializeOperator(config *rest.Config, namespace string, logger logr.Logger, scheme *runtime.Scheme, watchNamespace bool) error { + apiExtensionClient, err := apiextensionsclient.NewForConfig(config) + if err != nil { + return err + } + + crd, err := findCRD(apiExtensionClient) + if err != nil { + return err + } + clientset, err := kubernetes.NewForConfig(config) if err != nil { return err @@ -69,7 +87,7 @@ func InitializeOperator(config *rest.Config, namespace string, logger logr.Logge if err != nil { return err } - err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, namespace, dep, watchNamespace) + err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, namespace, crd, watchNamespace) if err != nil { return err } @@ -79,7 +97,7 @@ func InitializeOperator(config *rest.Config, namespace string, logger logr.Logge if err != nil { return err } - err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, namespace, dep, watchNamespace) + err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, namespace, crd, watchNamespace) if err != nil { return err } diff --git a/operator/utils/k8s/webhook.go b/operator/utils/k8s/webhook.go index 7ba34e605b..e94d541e87 100644 --- a/operator/utils/k8s/webhook.go +++ b/operator/utils/k8s/webhook.go @@ -6,6 +6,7 @@ import ( "k8s.io/api/admissionregistration/v1beta1" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" + apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" "k8s.io/apimachinery/pkg/api/errors" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -58,7 +59,7 @@ func NewWebhookCreator(client kubernetes.Interface, certs *Cert, logger logr.Log }, nil } -func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment, watchNamespace bool) error { +func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *apiextensionsv1beta1.CustomResourceDefinition, watchNamespace bool) error { mwc := v1beta1.MutatingWebhookConfiguration{} err := yaml.Unmarshal(rawYaml, &mwc) if err != nil { @@ -105,7 +106,7 @@ func (wc *WebhookCreator) CreateMutatingWebhookConfigurationFromFile(rawYaml []b return err } -func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *appsv1.Deployment, watchNamespace bool) error { +func (wc *WebhookCreator) CreateValidatingWebhookConfigurationFromFile(rawYaml []byte, namespace string, owner *apiextensionsv1beta1.CustomResourceDefinition, watchNamespace bool) error { vwc := v1beta1.ValidatingWebhookConfiguration{} err := yaml.Unmarshal(rawYaml, &vwc) if err != nil { diff --git a/operator/utils/k8s/webhook_test.go b/operator/utils/k8s/webhook_test.go index ff5eafad18..ef8aa1c128 100644 --- a/operator/utils/k8s/webhook_test.go +++ b/operator/utils/k8s/webhook_test.go @@ -2,10 +2,17 @@ package k8s import ( . "github.com/onsi/gomega" + machinelearningv1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1" + machinelearningv1alpha2 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1alpha2" + machinelearningv1alpha3 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1alpha3" appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" + "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" + apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" + apiextensionsfake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/serializer" "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" clientgoscheme "k8s.io/client-go/kubernetes/scheme" @@ -58,11 +65,34 @@ func createManagerDeployment(client kubernetes.Interface, namespace string) (*ap return client.AppsV1().Deployments(namespace).Create(deployment) } +func createCRD(client apiextensionsclient.Interface) (*v1beta1.CustomResourceDefinition, error) { + crd := &v1beta1.CustomResourceDefinition{ + ObjectMeta: metav1.ObjectMeta{ + Name: CRDName, + }, + Spec: v1beta1.CustomResourceDefinitionSpec{ + Group: "machinelearning.seldon.io", + Scope: v1beta1.ClusterScoped, + Names: v1beta1.CustomResourceDefinitionNames{ + Plural: "seldondeployments", + Kind: "seldondeployment", + }, + Version: "v1", + }, + } + return client.ApiextensionsV1beta1().CustomResourceDefinitions().Create(crd) +} + func createScheme() *runtime.Scheme { scheme := runtime.NewScheme() _ = clientgoscheme.AddToScheme(scheme) _ = appsv1.AddToScheme(scheme) _ = v1.AddToScheme(scheme) + _ = machinelearningv1.AddToScheme(scheme) + _ = machinelearningv1alpha2.AddToScheme(scheme) + _ = machinelearningv1alpha3.AddToScheme(scheme) + _ = v1beta1.AddToScheme(scheme) + _ = serializer.NewCodecFactory(scheme).UniversalDeserializer().Decode return scheme } @@ -72,14 +102,15 @@ func TestMutatingWebhookCreate(t *testing.T) { bytes, err := LoadBytesFromFile("testdata", "mutate.yaml") g.Expect(err).To(BeNil()) client := fake.NewSimpleClientset() - dep, err := createManagerDeployment(client, TestNamespace) + apiExtensionsFake := apiextensionsfake.NewSimpleClientset() + crd, err := createCRD(apiExtensionsFake) g.Expect(err).To(BeNil()) hosts := []string{"seldon-webhook-service.seldon-system", "seldon-webhook-service.seldon-system.svc"} certs, err := certSetup(hosts) g.Expect(err).To(BeNil()) wc, err := NewWebhookCreator(client, certs, ctrl.Log, scheme) g.Expect(err).To(BeNil()) - err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, TestNamespace, dep, false) + err = wc.CreateMutatingWebhookConfigurationFromFile(bytes, TestNamespace, crd, false) g.Expect(err).To(BeNil()) } @@ -89,14 +120,15 @@ func TestValidatingWebhookCreate(t *testing.T) { bytes, err := LoadBytesFromFile("testdata", "mutate.yaml") g.Expect(err).To(BeNil()) client := fake.NewSimpleClientset() - dep, err := createManagerDeployment(client, TestNamespace) + apiExtensionsFake := apiextensionsfake.NewSimpleClientset() + crd, err := createCRD(apiExtensionsFake) g.Expect(err).To(BeNil()) hosts := []string{"seldon-webhook-service.seldon-system", "seldon-webhook-service.seldon-system.svc"} certs, err := certSetup(hosts) g.Expect(err).To(BeNil()) wc, err := NewWebhookCreator(client, certs, ctrl.Log, scheme) g.Expect(err).To(BeNil()) - err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, TestNamespace, dep, false) + err = wc.CreateValidatingWebhookConfigurationFromFile(bytes, TestNamespace, crd, false) g.Expect(err).To(BeNil()) } diff --git a/python/Makefile b/python/Makefile index b7e4fc9915..e5050f0328 100644 --- a/python/Makefile +++ b/python/Makefile @@ -97,7 +97,7 @@ setup_linter: run_linter: black \ - ./ ../testing \ + ./ ../testing ../operator/helm \ --exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)" run_linter_check: From c9c5b471388c38e405ebe6d52a784cf492317c9d Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Wed, 11 Mar 2020 15:19:52 +0000 Subject: [PATCH 13/34] testing for new crd ownership --- operator/config/lite/role_webhook.yaml | 7 +++++++ operator/seldon-operator/deploy/cluster_role.yaml | 7 +++++++ .../seldon-operator.v1.1.0.clusterserviceversion.yaml | 11 ++++++++--- operator/seldon-operator/deploy/operator.yaml | 2 ++ operator/seldon-operator/deploy/role.yaml | 7 +++++++ 5 files changed, 31 insertions(+), 3 deletions(-) diff --git a/operator/config/lite/role_webhook.yaml b/operator/config/lite/role_webhook.yaml index c5ea044e07..b2d715af3b 100644 --- a/operator/config/lite/role_webhook.yaml +++ b/operator/config/lite/role_webhook.yaml @@ -22,3 +22,10 @@ rules: - get - patch - update +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list diff --git a/operator/seldon-operator/deploy/cluster_role.yaml b/operator/seldon-operator/deploy/cluster_role.yaml index d008d127a7..daf96a4463 100644 --- a/operator/seldon-operator/deploy/cluster_role.yaml +++ b/operator/seldon-operator/deploy/cluster_role.yaml @@ -51,6 +51,13 @@ rules: - get - patch - update +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list - apiGroups: - '' resources: diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index 30fefdf19c..7a4ae3c6fa 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -167,6 +167,13 @@ spec: - get - patch - update + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list - apiGroups: - "" resources: @@ -395,6 +402,7 @@ spec: - name: ISTIO_TLS_MODE - name: USE_EXECUTOR value: "true" + - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION value: seldonio/seldon-core-executor:1.0.3-SNAPSHOT - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY @@ -410,7 +418,6 @@ spec: - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default image: seldonio/seldon-core-operator:1.0.3-SNAPSHOT - imagePullPolicy: Always name: manager ports: - containerPort: 443 @@ -476,8 +483,6 @@ spec: url: https://www.seldon.io/ - name: Documentation url: https://docs.seldon.io/projects/seldon-core/en/latest/ - - name: Seldon Operator - url: https://github.com/seldonio/seldon-operator maintainers: - email: hello@seldon.io name: Seldon Technologies diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml index fdcf6efaec..64495ad6d6 100644 --- a/operator/seldon-operator/deploy/operator.yaml +++ b/operator/seldon-operator/deploy/operator.yaml @@ -77,6 +77,8 @@ spec: value: '' - name: USE_EXECUTOR value: 'true' + - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT + value: '' - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION value: seldonio/seldon-core-executor:1.0.3-SNAPSHOT - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY diff --git a/operator/seldon-operator/deploy/role.yaml b/operator/seldon-operator/deploy/role.yaml index 5caf5ab1e3..4137d6434a 100644 --- a/operator/seldon-operator/deploy/role.yaml +++ b/operator/seldon-operator/deploy/role.yaml @@ -51,6 +51,13 @@ rules: - get - patch - update +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list - apiGroups: - '' resources: From 49ed5fb226ac07b081ec13723532bfa0d2dfa38f Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Wed, 11 Mar 2020 17:57:18 +0000 Subject: [PATCH 14/34] update to 1.1.0-SNAPSHOT --- engine/pom.xml | 2 +- helm-charts/seldon-core-analytics/Chart.yaml | 2 +- helm-charts/seldon-core-operator/Chart.yaml | 2 +- helm-charts/seldon-core-operator/values.yaml | 32 +++++++++---------- operator/config/lite/role_webhook.yaml | 8 +++++ operator/config/manager/kustomization.yaml | 2 +- operator/config/manager/manager.yaml | 4 +-- operator/seldon-operator/Makefile | 2 +- .../seldon-operator/deploy/cluster_role.yaml | 8 +++++ ...operator.v1.1.0.clusterserviceversion.yaml | 16 +++++++--- operator/seldon-operator/deploy/operator.yaml | 6 ++-- operator/seldon-operator/deploy/role.yaml | 8 +++++ operator/utils/k8s/testdata/configmap.yaml | 1 - operator/utils/k8s/testdata/mutate.yaml | 1 - version.txt | 2 +- 15 files changed, 63 insertions(+), 33 deletions(-) diff --git a/engine/pom.xml b/engine/pom.xml index 0251a7d53d..cf94b0a9d2 100644 --- a/engine/pom.xml +++ b/engine/pom.xml @@ -10,7 +10,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs io.seldon.engine seldon-engine - 1.0.3-SNAPSHOT + 1.1.0-SNAPSHOT jar engine http://maven.apache.org diff --git a/helm-charts/seldon-core-analytics/Chart.yaml b/helm-charts/seldon-core-analytics/Chart.yaml index d557cae658..48de3b2bae 100644 --- a/helm-charts/seldon-core-analytics/Chart.yaml +++ b/helm-charts/seldon-core-analytics/Chart.yaml @@ -18,4 +18,4 @@ keywords: name: seldon-core-analytics sources: - https://github.com/SeldonIO/seldon-core -version: 1.0.3-SNAPSHOT +version: 1.1.0-SNAPSHOT diff --git a/helm-charts/seldon-core-operator/Chart.yaml b/helm-charts/seldon-core-operator/Chart.yaml index ae94a51a13..507322882f 100644 --- a/helm-charts/seldon-core-operator/Chart.yaml +++ b/helm-charts/seldon-core-operator/Chart.yaml @@ -6,4 +6,4 @@ keywords: name: seldon-core-operator sources: - https://github.com/SeldonIO/seldon-core -version: 1.0.3-SNAPSHOT +version: 1.1.0-SNAPSHOT diff --git a/helm-charts/seldon-core-operator/values.yaml b/helm-charts/seldon-core-operator/values.yaml index c3463543bf..c92b17911d 100644 --- a/helm-charts/seldon-core-operator/values.yaml +++ b/helm-charts/seldon-core-operator/values.yaml @@ -3,10 +3,10 @@ ambassador: singleNamespace: false certManager: enabled: false -controllerId: "" -createResources: false +controllerId: '' crd: create: true +createResources: false credentials: gcs: gcsCredentialFileName: gcloud-application-credentials.json @@ -20,7 +20,7 @@ engine: pullPolicy: IfNotPresent registry: docker.io repository: seldonio/engine - tag: 1.0.3-SNAPSHOT + tag: 1.1.0-SNAPSHOT logMessagesExternally: false port: 8000 prometheus: @@ -29,6 +29,7 @@ engine: name: default user: 8888 executor: + defaultRequestLoggerEndpointPrefix: http://default-broker. enabled: true grpc: port: 5001 @@ -36,23 +37,22 @@ executor: pullPolicy: IfNotPresent registry: docker.io repository: seldonio/seldon-core-executor - tag: 1.0.3-SNAPSHOT + tag: 1.1.0-SNAPSHOT port: 8000 prometheus: path: /prometheus serviceAccount: name: default user: 8888 - defaultRequestLoggerEndpointPrefix: 'http://default-broker.' image: pullPolicy: IfNotPresent registry: docker.io repository: seldonio/seldon-core-operator - tag: 1.0.3-SNAPSHOT + tag: 1.1.0-SNAPSHOT istio: enabled: false gateway: seldon-gateway - tlsMode: "" + tlsMode: '' kubeflow: false manager: cpuLimit: 500m @@ -64,33 +64,33 @@ predictiveUnit: predictor_servers: MLFLOW_SERVER: grpc: - defaultImageVersion: "0.3" + defaultImageVersion: '0.3' image: seldonio/mlflowserver_grpc rest: - defaultImageVersion: "0.3" + defaultImageVersion: '0.3' image: seldonio/mlflowserver_rest SKLEARN_SERVER: grpc: - defaultImageVersion: "0.2" + defaultImageVersion: '0.2' image: seldonio/sklearnserver_grpc rest: - defaultImageVersion: "0.2" + defaultImageVersion: '0.2' image: seldonio/sklearnserver_rest TENSORFLOW_SERVER: grpc: - defaultImageVersion: "0.7" + defaultImageVersion: '0.7' image: seldonio/tfserving-proxy_grpc rest: - defaultImageVersion: "0.7" + defaultImageVersion: '0.7' image: seldonio/tfserving-proxy_rest tensorflow: true tfImage: tensorflow/serving:2.1.0 XGBOOST_SERVER: grpc: - defaultImageVersion: "0.3" + defaultImageVersion: '0.3' image: seldonio/xgboostserver_grpc rest: - defaultImageVersion: "0.3" + defaultImageVersion: '0.3' image: seldonio/xgboostserver_rest rbac: configmap: @@ -101,7 +101,7 @@ serviceAccount: name: seldon-manager singleNamespace: false storageInitializer: - cpuLimit: "1" + cpuLimit: '1' cpuRequest: 100m image: gcr.io/kfserving/storage-initializer:0.2.2 memoryLimit: 1Gi diff --git a/operator/config/lite/role_webhook.yaml b/operator/config/lite/role_webhook.yaml index b2d715af3b..45c8d1d1e6 100644 --- a/operator/config/lite/role_webhook.yaml +++ b/operator/config/lite/role_webhook.yaml @@ -29,3 +29,11 @@ rules: verbs: - get - list +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions/finalizers + verbs: + - get + - patch + - update diff --git a/operator/config/manager/kustomization.yaml b/operator/config/manager/kustomization.yaml index 902d2b567f..e9d1198811 100644 --- a/operator/config/manager/kustomization.yaml +++ b/operator/config/manager/kustomization.yaml @@ -7,4 +7,4 @@ kind: Kustomization images: - name: controller newName: seldonio/seldon-core-operator - newTag: 1.0.3-SNAPSHOT + newTag: 1.1.0-SNAPSHOT diff --git a/operator/config/manager/manager.yaml b/operator/config/manager/manager.yaml index 808e1af6a0..15633f5538 100644 --- a/operator/config/manager/manager.yaml +++ b/operator/config/manager/manager.yaml @@ -48,7 +48,7 @@ spec: - name: AMBASSADOR_SINGLE_NAMESPACE value: "false" - name: ENGINE_CONTAINER_IMAGE_AND_VERSION - value: docker.io/seldonio/engine:1.0.3-SNAPSHOT + value: docker.io/seldonio/engine:1.1.0-SNAPSHOT - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY value: IfNotPresent - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME @@ -76,7 +76,7 @@ spec: - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT value: "" - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION - value: seldonio/seldon-core-executor:1.0.3-SNAPSHOT + value: seldonio/seldon-core-executor:1.1.0-SNAPSHOT - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY value: IfNotPresent - name: EXECUTOR_PROMETHEUS_PATH diff --git a/operator/seldon-operator/Makefile b/operator/seldon-operator/Makefile index 40ff4f45fe..a59b273d74 100644 --- a/operator/seldon-operator/Makefile +++ b/operator/seldon-operator/Makefile @@ -1,6 +1,6 @@ .PHONY: recreate-generated -recreate-generated: +generate-resources: rm -rf generated mkdir generated kustomize build ../config/lite -o generated diff --git a/operator/seldon-operator/deploy/cluster_role.yaml b/operator/seldon-operator/deploy/cluster_role.yaml index daf96a4463..f32dd4cc17 100644 --- a/operator/seldon-operator/deploy/cluster_role.yaml +++ b/operator/seldon-operator/deploy/cluster_role.yaml @@ -58,6 +58,14 @@ rules: verbs: - get - list +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions/finalizers + verbs: + - get + - patch + - update - apiGroups: - '' resources: diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index 7a4ae3c6fa..9c51a693fb 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -44,7 +44,7 @@ metadata: capabilities: Seamless Upgrades categories: Logging & Tracing certified: "false" - containerImage: seldonio/seldon-core-operator:1.0.3-SNAPSHOT + containerImage: seldonio/seldon-core-operator:1.1.3-SNAPSHOT createdAt: "2019-05-21 15:00:00" description: The Seldon operator for management, monitoring and operations of machine learning systems through the Seldon Engine. Once installed, the Seldon @@ -174,6 +174,14 @@ spec: verbs: - get - list + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions/finalizers + verbs: + - get + - patch + - update - apiGroups: - "" resources: @@ -378,7 +386,7 @@ spec: - name: AMBASSADOR_SINGLE_NAMESPACE value: "false" - name: ENGINE_CONTAINER_IMAGE_AND_VERSION - value: docker.io/seldonio/engine:1.0.3-SNAPSHOT + value: docker.io/seldonio/engine:1.1.0-SNAPSHOT - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY value: IfNotPresent - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME @@ -404,7 +412,7 @@ spec: value: "true" - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION - value: seldonio/seldon-core-executor:1.0.3-SNAPSHOT + value: seldonio/seldon-core-executor:1.1.0-SNAPSHOT - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY value: IfNotPresent - name: EXECUTOR_PROMETHEUS_PATH @@ -417,7 +425,7 @@ spec: value: "8888" - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default - image: seldonio/seldon-core-operator:1.0.3-SNAPSHOT + image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT name: manager ports: - containerPort: 443 diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml index 64495ad6d6..7f5c05c55c 100644 --- a/operator/seldon-operator/deploy/operator.yaml +++ b/operator/seldon-operator/deploy/operator.yaml @@ -52,7 +52,7 @@ spec: - name: AMBASSADOR_SINGLE_NAMESPACE value: 'false' - name: ENGINE_CONTAINER_IMAGE_AND_VERSION - value: docker.io/seldonio/engine:1.0.3-SNAPSHOT + value: docker.io/seldonio/engine:1.1.0-SNAPSHOT - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY value: IfNotPresent - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME @@ -80,7 +80,7 @@ spec: - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT value: '' - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION - value: seldonio/seldon-core-executor:1.0.3-SNAPSHOT + value: seldonio/seldon-core-executor:1.1.0-SNAPSHOT - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY value: IfNotPresent - name: EXECUTOR_PROMETHEUS_PATH @@ -93,7 +93,7 @@ spec: value: '8888' - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default - image: seldonio/seldon-core-operator:1.0.3-SNAPSHOT + image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT name: manager ports: - containerPort: 443 diff --git a/operator/seldon-operator/deploy/role.yaml b/operator/seldon-operator/deploy/role.yaml index 4137d6434a..6684484ef4 100644 --- a/operator/seldon-operator/deploy/role.yaml +++ b/operator/seldon-operator/deploy/role.yaml @@ -58,6 +58,14 @@ rules: verbs: - get - list +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions/finalizers + verbs: + - get + - patch + - update - apiGroups: - '' resources: diff --git a/operator/utils/k8s/testdata/configmap.yaml b/operator/utils/k8s/testdata/configmap.yaml index 4b0634099d..fd7d2d6e07 100644 --- a/operator/utils/k8s/testdata/configmap.yaml +++ b/operator/utils/k8s/testdata/configmap.yaml @@ -9,7 +9,6 @@ metadata: app: seldon app.kubernetes.io/instance: 'seldon-operator' app.kubernetes.io/name: 'seldon-core-operator' - app.kubernetes.io/version: '1.0.3-SNAPSHOT' control-plane: seldon-controller-manager name: seldon-config namespace: 'default' diff --git a/operator/utils/k8s/testdata/mutate.yaml b/operator/utils/k8s/testdata/mutate.yaml index 4f1d8b5930..9b95b97563 100644 --- a/operator/utils/k8s/testdata/mutate.yaml +++ b/operator/utils/k8s/testdata/mutate.yaml @@ -8,7 +8,6 @@ metadata: app: seldon app.kubernetes.io/instance: 'seldon-operator' app.kubernetes.io/name: 'seldon-core-operator' - app.kubernetes.io/version: '1.0.3-SNAPSHOT' name: seldon-mutating-webhook-configuration-default webhooks: - clientConfig: diff --git a/version.txt b/version.txt index 99eda91023..5902d52cce 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.3-SNAPSHOT +1.1.0-SNAPSHOT From 836cdd3f95050bf8ee2a0f0da0983dd33f71a20b Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Fri, 13 Mar 2020 07:53:38 +0000 Subject: [PATCH 15/34] add related images for engine and executor --- .../clusterrole_seldon-webhook-role.yaml | 15 +++ .../deployment_seldon-controller-manager.yaml | 4 + operator/config/manager/manager.yaml | 4 + .../seldondeployment_controller_test.go | 8 -- .../controllers/seldondeployment_engine.go | 59 +++++++-- .../seldondeployment_engine_test.go | 115 ++++++++++++++++++ operator/utils/k8s/testdata/validate.yaml | 91 ++++++++++++++ operator/utils/k8s/webhook_test.go | 2 +- 8 files changed, 276 insertions(+), 22 deletions(-) create mode 100644 operator/controllers/seldondeployment_engine_test.go create mode 100644 operator/utils/k8s/testdata/validate.yaml diff --git a/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml b/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml index 9961bc3217..4555a5a75c 100644 --- a/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml +++ b/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml @@ -27,3 +27,18 @@ rules: - get - patch - update +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions/finalizers + verbs: + - get + - patch + - update diff --git a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml index d0cd78a0e7..0e303a9751 100644 --- a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml +++ b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml @@ -41,6 +41,10 @@ spec: env: - name: WATCH_NAMESPACE value: '' + - name: RELATED_IMAGE_EXECUTOR + value: '' + - name: RELATED_IMAGE_ENGINE + value: '' - name: CREATE_RESOURCES value: '{{ .Values.createResources }}' - name: POD_NAMESPACE diff --git a/operator/config/manager/manager.yaml b/operator/config/manager/manager.yaml index 15633f5538..c33ff6fc45 100644 --- a/operator/config/manager/manager.yaml +++ b/operator/config/manager/manager.yaml @@ -35,6 +35,10 @@ spec: env: - name: WATCH_NAMESPACE value: "" + - name: RELATED_IMAGE_EXECUTOR + value: "" + - name: RELATED_IMAGE_ENGINE + value: "" - name: CREATE_RESOURCES value: "false" - name: POD_NAMESPACE diff --git a/operator/controllers/seldondeployment_controller_test.go b/operator/controllers/seldondeployment_controller_test.go index c5798b9d47..45322a2491 100644 --- a/operator/controllers/seldondeployment_controller_test.go +++ b/operator/controllers/seldondeployment_controller_test.go @@ -21,21 +21,13 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" machinelearningv1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1" - "io/ioutil" appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "path/filepath" "time" ) -func helperLoadBytes(name string) []byte { - path := filepath.Join("testdata", name) // relative path - bytes, _ := ioutil.ReadFile(path) - return bytes -} - var _ = Describe("Create a Seldon Deployment", func() { const timeout = time.Second * 30 const interval = time.Second * 1 diff --git a/operator/controllers/seldondeployment_engine.go b/operator/controllers/seldondeployment_engine.go index 3906526a65..5c180f6116 100644 --- a/operator/controllers/seldondeployment_engine.go +++ b/operator/controllers/seldondeployment_engine.go @@ -17,6 +17,7 @@ limitations under the License. package controllers import ( + "fmt" "os" "strconv" "strings" @@ -37,10 +38,19 @@ const ( DEFAULT_EXECUTOR_CONTAINER_PORT = 8000 DEFAULT_EXECUTOR_GRPC_PORT = 5001 + + ENV_EXECUTOR_IMAGE = "EXECUTOR_CONTAINER_IMAGE_AND_VERSION" + ENV_EXECUTOR_IMAGE_RELATED = "RELATED_IMAGE_EXECUTOR" //RedHat specific + ENV_ENGINE_IMAGE = "ENGINE_CONTAINER_IMAGE_AND_VERSION" + ENV_ENGINE_IMAGE_RELATED = "RELATED_IMAGE_ENGINE" //Redhat specific ) var ( - EngineContainerName = "seldon-container-engine" + EngineContainerName = "seldon-container-engine" + envExecutorImage = os.Getenv(ENV_EXECUTOR_IMAGE) + envExecutorImageRelated = os.Getenv(ENV_EXECUTOR_IMAGE_RELATED) + envEngineImage = os.Getenv(ENV_ENGINE_IMAGE) + envEngineImageRelated = os.Getenv(ENV_ENGINE_IMAGE_RELATED) ) func addEngineToDeployment(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, engine_http_port int, engine_grpc_port int, pSvcName string, deploy *appsv1.Deployment) error { @@ -187,7 +197,7 @@ func getSvcOrchUser(mlDep *machinelearningv1.SeldonDeployment) (int64, error) { return engineUser, nil } -func createExecutorContainer(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, predictorB64 string, http_port int, grpc_port int, resources *corev1.ResourceRequirements) corev1.Container { +func createExecutorContainer(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, predictorB64 string, http_port int, grpc_port int, resources *corev1.ResourceRequirements) (*corev1.Container, error) { transport := p.Transport //Backwards compatible with older resources if transport == "" { @@ -202,9 +212,18 @@ func createExecutorContainer(mlDep *machinelearningv1.SeldonDeployment, p *machi if protocol == "" { protocol = machinelearningv1.ProtocolSeldon } - return corev1.Container{ + + // Get executor image from env vars in order of priority + var executorImage string + if executorImage = envExecutorImageRelated; executorImage == "" { + if executorImage = envExecutorImage; executorImage == "" { + return nil, fmt.Errorf("Failed to find executor image from environment. Check %s or %s are set.", ENV_EXECUTOR_IMAGE, ENV_EXECUTOR_IMAGE_RELATED) + } + } + + return &corev1.Container{ Name: EngineContainerName, - Image: GetEnv("EXECUTOR_CONTAINER_IMAGE_AND_VERSION", "seldonio/seldon-core-executor:1.0.1-SNAPSHOT"), + Image: executorImage, Args: []string{ "--sdep", mlDep.Name, "--namespace", mlDep.Namespace, @@ -245,14 +264,22 @@ func createExecutorContainer(mlDep *machinelearningv1.SeldonDeployment, p *machi SuccessThreshold: 1, TimeoutSeconds: 60}, Resources: *resources, - } + }, nil } func createEngineContainerSpec(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, predictorB64 string, - engine_http_port int, engine_grpc_port int, engineResources *corev1.ResourceRequirements) corev1.Container { - return corev1.Container{ + engine_http_port int, engine_grpc_port int, engineResources *corev1.ResourceRequirements) (*corev1.Container, error) { + + // Get engine image from env vars in order of priority + var engineImage string + if engineImage = envEngineImageRelated; engineImage == "" { + if engineImage = envEngineImage; engineImage == "" { + return nil, fmt.Errorf("Failed to find engine image from environment. Check %s or %s are set.", ENV_ENGINE_IMAGE, ENV_ENGINE_IMAGE_RELATED) + } + } + return &corev1.Container{ Name: EngineContainerName, - Image: GetEnv("ENGINE_CONTAINER_IMAGE_AND_VERSION", "seldonio/engine:0.4.0"), + Image: engineImage, ImagePullPolicy: corev1.PullPolicy(GetEnv("ENGINE_CONTAINER_IMAGE_PULL_POLICY", "IfNotPresent")), TerminationMessagePath: "/dev/termination-log", TerminationMessagePolicy: corev1.TerminationMessageReadFile, @@ -294,7 +321,7 @@ func createEngineContainerSpec(mlDep *machinelearningv1.SeldonDeployment, p *mac }, }, Resources: *engineResources, - } + }, nil } // Create the Container for the service orchestrator. @@ -324,7 +351,7 @@ func createEngineContainer(mlDep *machinelearningv1.SeldonDeployment, p *machine } } - var c corev1.Container + var c *corev1.Container if isExecutorEnabled(mlDep) { executor_http_port, err := getExecutorHttpPort() if err != nil { @@ -334,9 +361,15 @@ func createEngineContainer(mlDep *machinelearningv1.SeldonDeployment, p *machine if err != nil { return nil, err } - c = createExecutorContainer(mlDep, p, predictorB64, executor_http_port, executor_grpc_port, engineResources) + c, err = createExecutorContainer(mlDep, p, predictorB64, executor_http_port, executor_grpc_port, engineResources) + if err != nil { + return nil, err + } } else { - c = createEngineContainerSpec(mlDep, p, predictorB64, engine_http_port, engine_grpc_port, engineResources) + c, err = createEngineContainerSpec(mlDep, p, predictorB64, engine_http_port, engine_grpc_port, engineResources) + if err != nil { + return nil, err + } } if engineUser != -1 { @@ -370,7 +403,7 @@ func createEngineContainer(mlDep *machinelearningv1.SeldonDeployment, p *machine } else { c.Env = append(c.Env, corev1.EnvVar{Name: "SELDON_LOG_MESSAGES_EXTERNALLY", Value: GetEnv("ENGINE_LOG_MESSAGES_EXTERNALLY", "false")}) } - return &c, nil + return c, nil } // Create the service orchestrator. diff --git a/operator/controllers/seldondeployment_engine_test.go b/operator/controllers/seldondeployment_engine_test.go new file mode 100644 index 0000000000..853b9bdd6c --- /dev/null +++ b/operator/controllers/seldondeployment_engine_test.go @@ -0,0 +1,115 @@ +package controllers + +import ( + . "github.com/onsi/gomega" + machinelearningv1 "github.com/seldonio/seldon-core/operator/apis/machinelearning/v1" + v1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "testing" +) + +func createTestSeldonDeployment() *machinelearningv1.SeldonDeployment { + var modelType = machinelearningv1.MODEL + key := types.NamespacedName{ + Name: "dep", + Namespace: "default", + } + return &machinelearningv1.SeldonDeployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: key.Name, + Namespace: key.Namespace, + }, + Spec: machinelearningv1.SeldonDeploymentSpec{ + Name: "mydep", + Predictors: []machinelearningv1.PredictorSpec{ + { + Name: "p1", + ComponentSpecs: []*machinelearningv1.SeldonPodSpec{ + { + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Image: "seldonio/mock_classifier:1.0", + Name: "classifier", + }, + }, + }, + }, + }, + Graph: &machinelearningv1.PredictiveUnit{ + Name: "classifier", + Type: &modelType, + Endpoint: &machinelearningv1.Endpoint{ + Type: machinelearningv1.GRPC, + }, + }, + }, + }, + }, + } +} + +func TestExecutorCreateNoEnv(t *testing.T) { + g := NewGomegaWithT(t) + envExecutorImage = "" + envExecutorImageRelated = "" + mlDep := createTestSeldonDeployment() + _, err := createExecutorContainer(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) + g.Expect(err).ToNot(BeNil()) +} + +func TestExecutorCreateEnv(t *testing.T) { + g := NewGomegaWithT(t) + imageName := "myimage" + envExecutorImage = imageName + envExecutorImageRelated = "" + mlDep := createTestSeldonDeployment() + con, err := createExecutorContainer(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) + g.Expect(err).To(BeNil()) + g.Expect(con.Image).To(Equal(imageName)) +} + +func TestExecutorCreateEnvRelated(t *testing.T) { + g := NewGomegaWithT(t) + imageName := "myimage" + imageNameRelated := "myimage2" + envExecutorImage = imageName + envExecutorImageRelated = imageNameRelated + mlDep := createTestSeldonDeployment() + con, err := createExecutorContainer(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) + g.Expect(err).To(BeNil()) + g.Expect(con.Image).To(Equal(imageNameRelated)) +} + +func TestEngineCreateNoEnv(t *testing.T) { + g := NewGomegaWithT(t) + envEngineImage = "" + envEngineImageRelated = "" + mlDep := createTestSeldonDeployment() + _, err := createEngineContainerSpec(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) + g.Expect(err).ToNot(BeNil()) +} + +func TestEngineCreateEnv(t *testing.T) { + g := NewGomegaWithT(t) + imageName := "myimage" + envEngineImage = imageName + envEngineImageRelated = "" + mlDep := createTestSeldonDeployment() + con, err := createEngineContainerSpec(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) + g.Expect(err).To(BeNil()) + g.Expect(con.Image).To(Equal(imageName)) +} + +func TestEngineCreateEnvRelated(t *testing.T) { + g := NewGomegaWithT(t) + imageName := "myimage" + imageNameRelated := "myimage2" + envEngineImage = imageName + envEngineImageRelated = imageNameRelated + mlDep := createTestSeldonDeployment() + con, err := createEngineContainerSpec(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) + g.Expect(err).To(BeNil()) + g.Expect(con.Image).To(Equal(imageNameRelated)) +} diff --git a/operator/utils/k8s/testdata/validate.yaml b/operator/utils/k8s/testdata/validate.yaml new file mode 100644 index 0000000000..96ff6ea239 --- /dev/null +++ b/operator/utils/k8s/testdata/validate.yaml @@ -0,0 +1,91 @@ +apiVersion: admissionregistration.k8s.io/v1beta1 +kind: ValidatingWebhookConfiguration +metadata: + annotations: + cert-manager.io/inject-ca-from: seldon-system/seldon-serving-cert + creationTimestamp: null + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldon-validating-webhook-configuration +webhooks: +- clientConfig: + caBundle: Cg== + service: + name: seldon-webhook-service + namespace: seldon-system + path: /validate-machinelearning-seldon-io-v1-seldondeployment + failurePolicy: Fail + name: v1.vseldondeployment.kb.io + namespaceSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + rules: + - apiGroups: + - machinelearning.seldon.io + apiVersions: + - v1 + operations: + - CREATE + - UPDATE + resources: + - seldondeployments +- clientConfig: + caBundle: Cg== + service: + name: seldon-webhook-service + namespace: seldon-system + path: /validate-machinelearning-seldon-io-v1alpha2-seldondeployment + failurePolicy: Fail + name: v1alpha2.vseldondeployment.kb.io + namespaceSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + rules: + - apiGroups: + - machinelearning.seldon.io + apiVersions: + - v1alpha2 + operations: + - CREATE + - UPDATE + resources: + - seldondeployments +- clientConfig: + caBundle: Cg== + service: + name: seldon-webhook-service + namespace: seldon-system + path: /validate-machinelearning-seldon-io-v1alpha3-seldondeployment + failurePolicy: Fail + name: v1alpha3.vseldondeployment.kb.io + namespaceSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + objectSelector: + matchExpressions: + - key: seldon.io/controller-id + operator: DoesNotExist + rules: + - apiGroups: + - machinelearning.seldon.io + apiVersions: + - v1alpha3 + operations: + - CREATE + - UPDATE + resources: + - seldondeployments diff --git a/operator/utils/k8s/webhook_test.go b/operator/utils/k8s/webhook_test.go index ef8aa1c128..aa6a51bcca 100644 --- a/operator/utils/k8s/webhook_test.go +++ b/operator/utils/k8s/webhook_test.go @@ -117,7 +117,7 @@ func TestMutatingWebhookCreate(t *testing.T) { func TestValidatingWebhookCreate(t *testing.T) { g := NewGomegaWithT(t) scheme := createScheme() - bytes, err := LoadBytesFromFile("testdata", "mutate.yaml") + bytes, err := LoadBytesFromFile("testdata", "validate.yaml") g.Expect(err).To(BeNil()) client := fake.NewSimpleClientset() apiExtensionsFake := apiextensionsfake.NewSimpleClientset() From b3a387138c6908550b88b2a2a9014e15f84c57d6 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Fri, 13 Mar 2020 19:28:23 +0000 Subject: [PATCH 16/34] Add related images --- .../1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml | 6 ++++++ operator/seldon-operator/deploy/operator.yaml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index 9c51a693fb..c4840345ac 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -90,6 +90,9 @@ spec: - kind: ValidatingWebhookConfiguration name: "" version: v1beta1 + - kind: customresourcedefinitions + name: "" + version: v1beta1 specDescriptors: - description: Name of the seldon deployment displayName: name @@ -374,6 +377,8 @@ spec: valueFrom: fieldRef: fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: RELATED_IMAGE_EXECUTOR + - name: RELATED_IMAGE_ENGINE - name: CREATE_RESOURCES value: "true" - name: POD_NAMESPACE @@ -426,6 +431,7 @@ spec: - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT + imagePullPolicy: Always name: manager ports: - containerPort: 443 diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml index 7f5c05c55c..eabb32df7c 100644 --- a/operator/seldon-operator/deploy/operator.yaml +++ b/operator/seldon-operator/deploy/operator.yaml @@ -39,6 +39,10 @@ spec: env: - name: WATCH_NAMESPACE value: '' + - name: RELATED_IMAGE_EXECUTOR + value: '' + - name: RELATED_IMAGE_ENGINE + value: '' - name: CREATE_RESOURCES value: 'true' - name: POD_NAMESPACE From 82d6cd6feef7ba086181bed8495361a4d89a6d56 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Tue, 17 Mar 2020 18:22:56 +0000 Subject: [PATCH 17/34] start README --- operator/seldon-operator/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/operator/seldon-operator/README.md b/operator/seldon-operator/README.md index d473af8365..de03083b26 100644 --- a/operator/seldon-operator/README.md +++ b/operator/seldon-operator/README.md @@ -2,3 +2,22 @@ ## Resource Generation +For a new release: + +Regenerate the core yaml from kustomize for the "lite" version of Core: + +``` +make generate-resources +``` + +Recreate the core yaml from these resources: + +``` +make deploy/operator.yaml +``` + +Create a new rule in the Makefile to generate the operator CSV from a previous version using the latest yaml. For 1.1.0 this is an initial rule based off a phony previous release 1.0.0. + +``` + +``` From eb9533e7c3673835bd31ce48628d900129dd99da Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Wed, 18 Mar 2020 18:32:43 +0000 Subject: [PATCH 18/34] update docs for testing --- operator/seldon-operator/README.md | 151 + ...arning.seldon.io_seldondeployment_crd.yaml | 4911 +++++++++++++++++ ...operator.v1.0.0.clusterserviceversion.yaml | 500 ++ ...operator.v1.1.0.clusterserviceversion.yaml | 5 +- operator/seldon-operator/deploy/operator.yaml | 6 +- .../testing/openshift/README.md | 1 + .../testing/standalone/README.md | 33 + 7 files changed, 5603 insertions(+), 4 deletions(-) create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/machinelearning.seldon.io_seldondeployment_crd.yaml create mode 100644 operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/seldon-operator.v1.0.0.clusterserviceversion.yaml create mode 100644 operator/seldon-operator/testing/standalone/README.md diff --git a/operator/seldon-operator/README.md b/operator/seldon-operator/README.md index de03083b26..7dec608996 100644 --- a/operator/seldon-operator/README.md +++ b/operator/seldon-operator/README.md @@ -19,5 +19,156 @@ make deploy/operator.yaml Create a new rule in the Makefile to generate the operator CSV from a previous version using the latest yaml. For 1.1.0 this is an initial rule based off a phony previous release 1.0.0. ``` +make clean_1.1.0 deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +``` + +Check the OLM bundle. For this you need to have installed [operator-courier](https://github.com/operator-framework/operator-courier). + +``` +make operator-courier_ui_validate +``` + +Start a Kind cluster and test the Operator via the scorecard application. You need to have installed [operator-sdk](https://github.com/operator-framework/operator-sdk/blob/master/doc/user/install-operator-sdk.md). + +You will need a running cluster with kubectl authenticated and the latest images to test loaded onto the cluster. + +``` +make scorecard +``` + +The output should be simialr to: + +``` +INFO[0000] Using config file: /home/clive/work/seldon-core/fork-seldon-core/operator/seldon-operator/.osdk-scorecard.yaml +basic: + Spec Block Exists : pass + Labels: + "necessity":"required" + "suite":"basic" + "test":"checkspectest" + + Status Block Exists : pass + Labels: + "suite":"basic" + "test":"checkstatustest" + "necessity":"required" + + Writing into CRs has an effect : pass + Labels: + "necessity":"required" + "suite":"basic" + "test":"writingintocrshaseffecttest" + +olm: + Spec fields with descriptors : pass + Labels: + "test":"specdescriptorstest" + "necessity":"required" + "suite":"olm" + + Status fields with descriptors : pass + Labels: + "necessity":"required" + "suite":"olm" + "test":"statusdescriptorstest" + + Bundle Validation Test : pass + Labels: + "necessity":"required" + "suite":"olm" + "test":"bundlevalidationtest" + Log: + time="2020-03-18T15:39:42Z" level=info msg="loading Bundles" dir=deploy/olm-catalog/seldon-operator +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=seldon-operator load=bundles +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=0.1.2 load=bundles +time="2020-03-18T15:39:42Z" level=info msg="found csv, loading bundle" dir=deploy/olm-catalog/seldon-operator file=seldonoperator.v0.1.2.clusterserviceversion.yaml load=bundles +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/0.1.2 file=seldondeployments.machinelearning.seldon.io.crd.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/0.1.2 file=seldonoperator.v0.1.2.clusterserviceversion.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=0.1.3 load=bundles +time="2020-03-18T15:39:42Z" level=info msg="found csv, loading bundle" dir=deploy/olm-catalog/seldon-operator file=seldonoperator.v0.1.3.clusterserviceversion.yaml load=bundles +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/0.1.3 file=seldondeployments.machinelearning.seldon.io.crd.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/0.1.3 file=seldonoperator.v0.1.3.clusterserviceversion.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=0.1.4 load=bundles +time="2020-03-18T15:39:42Z" level=info msg="found csv, loading bundle" dir=deploy/olm-catalog/seldon-operator file=seldonoperator.v0.1.4.clusterserviceversion.yaml load=bundles +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/0.1.4 file=seldondeployments.machinelearning.seldon.io.crd.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/0.1.4 file=seldonoperator.v0.1.4.clusterserviceversion.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=0.1.5 load=bundles +time="2020-03-18T15:39:42Z" level=info msg="found csv, loading bundle" dir=deploy/olm-catalog/seldon-operator file=seldonoperator.v0.1.5.clusterserviceversion.yaml load=bundles +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/0.1.5 file=seldondeployments.machinelearning.seldon.io.crd.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/0.1.5 file=seldonoperator.v0.1.5.clusterserviceversion.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=1.0.0 load=bundles +time="2020-03-18T15:39:42Z" level=info msg="found csv, loading bundle" dir=deploy/olm-catalog/seldon-operator file=seldon-operator.v1.0.0.clusterserviceversion.yaml load=bundles +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/1.0.0 file=machinelearning.seldon.io_seldondeployment_crd.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/1.0.0 file=seldon-operator.v1.0.0.clusterserviceversion.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=1.1.0 load=bundles +time="2020-03-18T15:39:42Z" level=info msg="found csv, loading bundle" dir=deploy/olm-catalog/seldon-operator file=seldon-operator.v1.1.0.clusterserviceversion.yaml load=bundles +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/1.1.0 file=machinelearning.seldon.io_seldondeployment_crd.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg="loading bundle file" dir=deploy/olm-catalog/seldon-operator/1.1.0 file=seldon-operator.v1.1.0.clusterserviceversion.yaml load=bundle +time="2020-03-18T15:39:42Z" level=info msg="loading Packages and Entries" dir=deploy/olm-catalog/seldon-operator +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=seldon-operator load=package +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=0.1.2 load=package +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=0.1.3 load=package +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=0.1.4 load=package +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=0.1.5 load=package +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=1.0.0 load=package +time="2020-03-18T15:39:42Z" level=info msg=directory dir=deploy/olm-catalog/seldon-operator file=1.1.0 load=package + + Provided APIs have validation : pass + Labels: + "suite":"olm" + "test":"crdshavevalidationtest" + "necessity":"required" + + Owned CRDs have resources listed : pass + Labels: + "necessity":"required" + "suite":"olm" + "test":"crdshaveresourcestest" ``` + +Next step is to run manual tests on clusters. + +## Standalone Resource Test + +To run a manual test follow the instructions in [testing/standalone/README.md](./testing/standalone/README.md) + +## Quay upload of Operator Bundle + +Upload latest bundle to quay. You will need a quay token saved in QUAY_TOKEN environment variable. To get this you need to clone operator-courier and then use + +``` +./operator-courier/scripts/get-quay-token +``` + +For login details use 1password. + +export token, e.g. + +``` +export QUAY_TOKEN="basic f2VsAG9uNmZydXsd12I2R0hPUCpwc3Vy" +``` + +Then run + +``` +make operator-courier_push +``` + +You will need to delete any old application from quay before this will succeed. + +Go to https://quay.io/application/seldon/seldon-operator?tab=settings and make it public. + +## Vanilla K8S with OLM + +Follow quay bundle upload above. + +See [testing/k8s/README.md](testing/k8s/README.md). + +## Openshift cluster + +Follow quay bundle upload above. + +See [testing/openshift/README.md](testing/openshift/README.md). + + diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/machinelearning.seldon.io_seldondeployment_crd.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/machinelearning.seldon.io_seldondeployment_crd.yaml new file mode 100644 index 0000000000..aec7d44546 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/machinelearning.seldon.io_seldondeployment_crd.yaml @@ -0,0 +1,4911 @@ +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition +metadata: + annotations: + cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) + creationTimestamp: null + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + name: seldondeployments.machinelearning.seldon.io +spec: + group: machinelearning.seldon.io + names: + kind: SeldonDeployment + plural: seldondeployments + shortNames: + - sdep + scope: Namespaced + subresources: + status: {} + validation: + openAPIV3Schema: + description: SeldonDeployment is the Schema for the seldondeployments API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: SeldonDeploymentSpec defines the desired state of SeldonDeployment + properties: + annotations: + additionalProperties: + type: string + type: object + name: + description: Name is Deprecated will be removed in future + type: string + oauth_key: + type: string + oauth_secret: + type: string + predictors: + items: + properties: + annotations: + additionalProperties: + type: string + type: object + componentSpecs: + items: + properties: + hpaSpec: + properties: + maxReplicas: + format: int32 + type: integer + metrics: + items: + description: MetricSpec specifies how to scale based + on a single metric (only `type` and one other matching + field should be set at once). + properties: + external: + description: external refers to a global metric + that is not associated with any Kubernetes object. + It allows autoscaling based on information coming + from components running outside of cluster (for + example length of queue in cloud messaging service, + or QPS from loadbalancer running outside of + cluster). + properties: + metricName: + description: metricName is the name of the + metric in question. + type: string + metricSelector: + description: metricSelector is used to identify + a specific time series within a given metric. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + targetAverageValue: + description: targetAverageValue is the target + per-pod value of global metric (as a quantity). + Mutually exclusive with TargetValue. + type: string + targetValue: + description: targetValue is the target value + of the metric (as a quantity). Mutually + exclusive with TargetAverageValue. + type: string + required: + - metricName + type: object + object: + description: object refers to a metric describing + a single kubernetes object (for example, hits-per-second + on an Ingress object). + properties: + averageValue: + description: averageValue is the target value + of the average of the metric across all + relevant pods (as a quantity) + type: string + metricName: + description: metricName is the name of the + metric in question. + type: string + selector: + description: selector is the string-encoded + form of a standard kubernetes label selector + for the given metric When set, it is passed + as an additional parameter to the metrics + server for more specific metrics scoping + When unset, just the metricName will be + used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + target: + description: target is the described Kubernetes + object. + properties: + apiVersion: + description: API version of the referent + type: string + kind: + description: 'Kind of the referent; More + info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds"' + type: string + name: + description: 'Name of the referent; More + info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + required: + - kind + - name + type: object + targetValue: + description: targetValue is the target value + of the metric (as a quantity). + type: string + required: + - metricName + - target + - targetValue + type: object + pods: + description: pods refers to a metric describing + each pod in the current scale target (for example, + transactions-processed-per-second). The values + will be averaged together before being compared + to the target value. + properties: + metricName: + description: metricName is the name of the + metric in question + type: string + selector: + description: selector is the string-encoded + form of a standard kubernetes label selector + for the given metric When set, it is passed + as an additional parameter to the metrics + server for more specific metrics scoping + When unset, just the metricName will be + used to gather metrics. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: operator represents + a key's relationship to a set + of values. Valid operators are + In, NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values array + must be non-empty. If the operator + is Exists or DoesNotExist, the + values array must be empty. This + array is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} + pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are ANDed. + type: object + type: object + targetAverageValue: + description: targetAverageValue is the target + value of the average of the metric across + all relevant pods (as a quantity) + type: string + required: + - metricName + - targetAverageValue + type: object + resource: + description: resource refers to a resource metric + (such as those specified in requests and limits) + known to Kubernetes describing each pod in the + current scale target (e.g. CPU or memory). Such + metrics are built in to Kubernetes, and have + special scaling options on top of those available + to normal per-pod metrics using the "pods" source. + properties: + name: + description: name is the name of the resource + in question. + type: string + targetAverageUtilization: + description: targetAverageUtilization is the + target value of the average of the resource + metric across all relevant pods, represented + as a percentage of the requested value of + the resource for the pods. + format: int32 + type: integer + targetAverageValue: + description: targetAverageValue is the target + value of the average of the resource metric + across all relevant pods, as a raw value + (instead of as a percentage of the request), + similar to the "pods" metric source type. + type: string + required: + - name + type: object + type: + description: type is the type of metric source. It + should be one of "Object", "Pods" or "Resource", + each mapping to a matching field in the object. + type: string + required: + - type + type: object + type: array + minReplicas: + format: int32 + type: integer + required: + - maxReplicas + type: object + metadata: + type: object + spec: + description: PodSpec is a description of a pod. + properties: + activeDeadlineSeconds: + description: Optional duration in seconds the pod may + be active on the node relative to StartTime before + the system will actively try to mark it failed and + kill associated containers. Value must be a positive + integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling constraints + properties: + nodeAffinity: + description: Describes node affinity scheduling + rules for the pod. + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose + a node that violates one or more of the expressions. + The node that is most preferred is the one + with the greatest sum of weights, i.e. for + each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum + by iterating through the elements of this + field and adding "weight" to the sum if the + node matches the corresponding matchExpressions; + the node(s) with the highest sum are the most + preferred. + items: + description: An empty preferred scheduling + term matches all objects with implicit weight + 0 (i.e. it's a no-op). A null preferred + scheduling term matches no objects (i.e. + is also a no-op). + properties: + preference: + description: A node selector term, associated + with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + weight: + description: Weight associated with matching + the corresponding nodeSelectorTerm, + in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. + If the affinity requirements specified by + this field cease to be met at some point during + pod execution (e.g. due to an update), the + system may or may not try to eventually evict + the pod from its node. + properties: + nodeSelectorTerms: + description: Required. A list of node selector + terms. The terms are ORed. + items: + description: A null or empty node selector + term matches no objects. The requirements + of them are ANDed. The TopologySelectorTerm + type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: A node selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: Represents a key's + relationship to a set of values. + Valid operators are In, NotIn, + Exists, DoesNotExist. Gt, + and Lt. + type: string + values: + description: An array of string + values. If the operator is + In or NotIn, the values array + must be non-empty. If the + operator is Exists or DoesNotExist, + the values array must be empty. + If the operator is Gt or Lt, + the values array must have + a single element, which will + be interpreted as an integer. + This array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + type: object + type: array + required: + - nodeSelectorTerms + type: object + type: object + podAffinity: + description: Describes pod affinity scheduling rules + (e.g. co-locate this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the affinity expressions + specified by this field, but it may choose + a node that violates one or more of the expressions. + The node that is most preferred is the one + with the greatest sum of weights, i.e. for + each node that meets all of the scheduling + requirements (resource request, requiredDuringScheduling + affinity expressions, etc.), compute a sum + by iterating through the elements of this + field and adding "weight" to the sum if the + node has pods which matches the corresponding + podAffinityTerm; the node(s) with the highest + sum are the most preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added + per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity + term, associated with the corresponding + weight. + properties: + labelSelector: + description: A label query over a + set of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies + which namespaces the labelSelector + applies to (matches against); null + or empty list means "this pod's + namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where + co-located is defined as running + on a node whose value of the label + with key topologyKey matches that + of any node on which any of the + selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in + the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the affinity requirements specified + by this field are not met at scheduling time, + the pod will not be scheduled onto the node. + If the affinity requirements specified by + this field cease to be met at some point during + pod execution (e.g. due to a pod label update), + the system may or may not try to eventually + evict the pod from its node. When there are + multiple elements, the lists of nodes corresponding + to each podAffinityTerm are intersected, i.e. + all terms must be satisfied. + items: + description: Defines a set of pods (namely + those matching the labelSelector relative + to the given namespace(s)) that this pod + should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is + defined as running on a node whose value + of the label with key matches + that of any node on which a pod of the set + of pods is running + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a + set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values + array must be non-empty. If + the operator is Exists or + DoesNotExist, the values array + must be empty. This array + is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + namespaces: + description: namespaces specifies which + namespaces the labelSelector applies + to (matches against); null or empty + list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling + rules (e.g. avoid putting this pod in the same + node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: The scheduler will prefer to schedule + pods to nodes that satisfy the anti-affinity + expressions specified by this field, but it + may choose a node that violates one or more + of the expressions. The node that is most + preferred is the one with the greatest sum + of weights, i.e. for each node that meets + all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity + expressions, etc.), compute a sum by iterating + through the elements of this field and adding + "weight" to the sum if the node has pods which + matches the corresponding podAffinityTerm; + the node(s) with the highest sum are the most + preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added + per-node to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity + term, associated with the corresponding + weight. + properties: + labelSelector: + description: A label query over a + set of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: A label selector + requirement is a selector + that contains values, a key, + and an operator that relates + the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: operator represents + a key's relationship to + a set of values. Valid + operators are In, NotIn, + Exists and DoesNotExist. + type: string + values: + description: values is an + array of string values. + If the operator is In + or NotIn, the values array + must be non-empty. If + the operator is Exists + or DoesNotExist, the values + array must be empty. This + array is replaced during + a strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a + map of {key,value} pairs. A + single {key,value} in the matchLabels + map is equivalent to an element + of matchExpressions, whose key + field is "key", the operator + is "In", and the values array + contains only "value". The requirements + are ANDed. + type: object + type: object + namespaces: + description: namespaces specifies + which namespaces the labelSelector + applies to (matches against); null + or empty list means "this pod's + namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where + co-located is defined as running + on a node whose value of the label + with key topologyKey matches that + of any node on which any of the + selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: weight associated with matching + the corresponding podAffinityTerm, in + the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + requiredDuringSchedulingIgnoredDuringExecution: + description: If the anti-affinity requirements + specified by this field are not met at scheduling + time, the pod will not be scheduled onto the + node. If the anti-affinity requirements specified + by this field cease to be met at some point + during pod execution (e.g. due to a pod label + update), the system may or may not try to + eventually evict the pod from its node. When + there are multiple elements, the lists of + nodes corresponding to each podAffinityTerm + are intersected, i.e. all terms must be satisfied. + items: + description: Defines a set of pods (namely + those matching the labelSelector relative + to the given namespace(s)) that this pod + should be co-located (affinity) or not co-located + (anti-affinity) with, where co-located is + defined as running on a node whose value + of the label with key matches + that of any node on which a pod of the set + of pods is running + properties: + labelSelector: + description: A label query over a set + of resources, in this case pods. + properties: + matchExpressions: + description: matchExpressions is a + list of label selector requirements. + The requirements are ANDed. + items: + description: A label selector requirement + is a selector that contains values, + a key, and an operator that relates + the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: + description: operator represents + a key's relationship to a + set of values. Valid operators + are In, NotIn, Exists and + DoesNotExist. + type: string + values: + description: values is an array + of string values. If the operator + is In or NotIn, the values + array must be non-empty. If + the operator is Exists or + DoesNotExist, the values array + must be empty. This array + is replaced during a strategic + merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map + of {key,value} pairs. A single {key,value} + in the matchLabels map is equivalent + to an element of matchExpressions, + whose key field is "key", the operator + is "In", and the values array contains + only "value". The requirements are + ANDed. + type: object + type: object + namespaces: + description: namespaces specifies which + namespaces the labelSelector applies + to (matches against); null or empty + list means "this pod's namespace" + items: + type: string + type: array + topologyKey: + description: This pod should be co-located + (affinity) or not co-located (anti-affinity) + with the pods matching the labelSelector + in the specified namespaces, where co-located + is defined as running on a node whose + value of the label with key topologyKey + matches that of any node on which any + of the selected pods is running. Empty + topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates + whether a service account token should be automatically + mounted. + type: boolean + containers: + description: List of containers belonging to the pod. + Containers cannot currently be added or removed. There + must be at least one container in a Pod. Cannot be + updated. + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The + docker image''s CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable + cannot be resolved, the reference in the input + string will be unchanged. The $(VAR_NAME) syntax + can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The docker image''s ENTRYPOINT is used + if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a + double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to + set in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) + are expanded using the previous defined + environment variables in the container + and any service environment variables. + If a variable cannot be resolved, the + reference in the input string will be + unchanged. The $(VAR_NAME) syntax can + be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, + regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if value + is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or it's key must be + defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + description: Specifies the output + format of the exposed resources, + defaults to "1" + type: string + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment + variables in the container. The keys defined + within a source must be a C_IDENTIFIER. All + invalid keys will be reported as an event when + the container is starting. When a key exists + in multiple sources, the value associated with + the last source will take precedence. Values + defined by an Env with a duplicate key will + take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be + a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level + config management to default or override container + images in workload controllers like Deployments + and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, + Never, IfNotPresent. Defaults to Always if :latest + tag is specified, or IfNotPresent otherwise. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately + before a container is terminated due to + an API request or management event such + as liveness probe failure, preemption, resource + contention, etc. The handler is not called + if the container crashes or exits. The reason + for termination is passed to the handler. + The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. + Regardless of the outcome of the handler, + the container will eventually terminate + within the Pod''s termination grace period. + Other management of the container blocks + until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as + a DNS_LABEL. Each container in a pod must have + a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: List of ports to expose from the + container. Exposing a port here gives the system + additional information about the network connections + a container uses, but is primarily informational. + Not specifying a port here DOES NOT prevent + that port from being exposed. Any port which + is listening on the default "0.0.0.0" address + inside a container will be accessible from the + network. Cannot be updated. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on + the pod's IP address. This must be a valid + port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: Number of port to expose on + the host. If specified, this must be a + valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be + an IANA_SVC_NAME and unique within the + pod. Each named port in a pod must have + a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be + UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum + amount of compute resources required. If + Requests is omitted for a container, it + defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls + whether a process can gain more privileges + than its parent process. This bool directly + controls if the no_new_privs flag will be + set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) + run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop + when running containers. Defaults to the + default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: procMount denotes the type of + proc mount to use for the containers. The + default is DefaultProcMount which uses the + container runtime defaults for readonly + paths and masked paths. This requires the + ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a + read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint + of the container process. Uses runtime default + if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container + must run as a non-root user. If true, the + Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 + (root) and fail to start the container if + it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint + of the container process. Defaults to user + specified in image metadata if unspecified. + May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate + a buffer for stdin in the container runtime. + If this is not set, reads from stdin in the + container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should + close the stdin channel after it has been opened + by a single attach. When stdin is true the stdin + stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until + the first client attaches to stdin, and then + remains open and accepts data until the client + disconnects, at which time stdin is closed and + remains closed until the container is restarted. + If this flag is false, a container processes + that reads from stdin will never receive an + EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file + to which the container''s termination message + will be written is mounted into the container''s + filesystem. Message written is intended to be + brief final status, such as an assertion failure + message. Will be truncated by the node if greater + than 4096 bytes. The total message length across + all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message + should be populated. File will use the contents + of terminationMessagePath to populate the container + status message on both success and failure. + FallbackToLogsOnError will use the last chunk + of container log output if the termination message + file is empty and the container exited with + an error. The log output is limited to 2048 + bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be + true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This is + a beta feature. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will + be mapped to. + type: string + name: + description: name must match the name of + a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container at + which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines + how mounts are propagated from the host + to container and the other way around. + When not set, MountPropagationNone is + used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of + a Volume. + type: string + readOnly: + description: Mounted read-only if true, + read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + subPath: + description: Path within the volume from + which the container's volume should be + mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume + from which the container's volume should + be mounted. Behaves similarly to SubPath + but environment variable references $(VAR_NAME) + are expanded using the container's environment. + Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. This + field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If + not specified, the container runtime's default + will be used, which might be configured in the + container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + dnsConfig: + description: Specifies the DNS parameters of a pod. + Parameters specified here will be merged to the generated + DNS configuration based on DNSPolicy. + properties: + nameservers: + description: A list of DNS name server IP addresses. + This will be appended to the base nameservers + generated from DNSPolicy. Duplicated nameservers + will be removed. + items: + type: string + type: array + options: + description: A list of DNS resolver options. This + will be merged with the base options generated + from DNSPolicy. Duplicated entries will be removed. + Resolution options given in Options will override + those that appear in the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver + options of a pod. + properties: + name: + description: Required. + type: string + value: + type: string + type: object + type: array + searches: + description: A list of DNS search domains for host-name + lookup. This will be appended to the base search + paths generated from DNSPolicy. Duplicated search + paths will be removed. + items: + type: string + type: array + type: object + dnsPolicy: + description: Set DNS policy for the pod. Defaults to + "ClusterFirst". Valid values are 'ClusterFirstWithHostNet', + 'ClusterFirst', 'Default' or 'None'. DNS parameters + given in DNSConfig will be merged with the policy + selected with DNSPolicy. To have DNS options set along + with hostNetwork, you have to specify DNS policy explicitly + to 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: 'EnableServiceLinks indicates whether information + about services should be injected into pod''s environment + variables, matching the syntax of Docker links. Optional: + Defaults to true.' + type: boolean + hostAliases: + description: HostAliases is an optional list of hosts + and IPs that will be injected into the pod's hosts + file if specified. This is only valid for non-hostNetwork + pods. + items: + description: HostAlias holds the mapping between IP + and hostnames that will be injected as an entry + in the pod's hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + ip: + description: IP address of the host file entry. + type: string + type: object + type: array + hostIPC: + description: 'Use the host''s ipc namespace. Optional: + Default to false.' + type: boolean + hostNetwork: + description: Host networking requested for this pod. + Use the host's network namespace. If this option is + set, the ports that will be used must be specified. + Default to false. + type: boolean + hostPID: + description: 'Use the host''s pid namespace. Optional: + Default to false.' + type: boolean + hostname: + description: Specifies the hostname of the Pod If not + specified, the pod's hostname will be set to a system-defined + value. + type: string + imagePullSecrets: + description: 'ImagePullSecrets is an optional list of + references to secrets in the same namespace to use + for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual + puller implementations for them to use. For example, + in the case of docker, only DockerConfig type secrets + are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod' + items: + description: LocalObjectReference contains enough + information to let you locate the referenced object + inside the same namespace. + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + type: object + type: array + initContainers: + description: 'List of initialization containers belonging + to the pod. Init containers are executed in order + prior to containers being started. If any init container + fails, the pod is considered to have failed and is + handled according to its restartPolicy. The name for + an init container or normal container must be unique + among all containers. Init containers may not have + Lifecycle actions, Readiness probes, or Liveness probes. + The resourceRequirements of an init container are + taken into account during scheduling by finding the + highest request/limit for each resource type, and + then using the max of of that value or the sum of + the normal containers. Limits are applied to init + containers in a similar fashion. Init containers cannot + currently be added or removed. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/' + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The + docker image''s CMD is used if this is not provided. + Variable references $(VAR_NAME) are expanded + using the container''s environment. If a variable + cannot be resolved, the reference in the input + string will be unchanged. The $(VAR_NAME) syntax + can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot + be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within + a shell. The docker image''s ENTRYPOINT is used + if this is not provided. Variable references + $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, + the reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a + double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether + the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to + set in the container. Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: Name of the environment variable. + Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) + are expanded using the previous defined + environment variables in the container + and any service environment variables. + If a variable cannot be resolved, the + reference in the input string will be + unchanged. The $(VAR_NAME) syntax can + be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, + regardless of whether the variable exists + or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if value + is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + ConfigMap or it's key must be + defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the + pod: supports metadata.name, metadata.namespace, + metadata.labels, metadata.annotations, + spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of + the container: only resources limits + and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required + for volumes, optional for env + vars' + type: string + divisor: + description: Specifies the output + format of the exposed resources, + defaults to "1" + type: string + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. + apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the + Secret or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment + variables in the container. The keys defined + within a source must be a C_IDENTIFIER. All + invalid keys will be reported as an event when + the container is starting. When a key exists + in multiple sources, the value associated with + the last source will take precedence. Values + defined by an Env with a duplicate key will + take precedence. Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend + to each key in the ConfigMap. Must be + a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level + config management to default or override container + images in workload controllers like Deployments + and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, + Never, IfNotPresent. Defaults to Always if :latest + tag is specified, or IfNotPresent otherwise. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system + should take in response to container lifecycle + events. Cannot be updated. + properties: + postStart: + description: 'PostStart is called immediately + after a container is created. If the handler + fails, the container is terminated and restarted + according to its restart policy. Other management + of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately + before a container is terminated due to + an API request or management event such + as liveness probe failure, preemption, resource + contention, etc. The handler is not called + if the container crashes or exits. The reason + for termination is passed to the handler. + The Pod''s termination grace period countdown + begins before the PreStop hooked is executed. + Regardless of the outcome of the handler, + the container will eventually terminate + within the Pod''s termination grace period. + Other management of the container blocks + until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies + the action to take. + properties: + command: + description: Command is the command + line to execute inside the container, + the working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it + is not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to + explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http + request to perform. + properties: + host: + description: Host name to connect + to, defaults to the pod IP. You + probably want to set "Host" in httpHeaders + instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: The header field + name + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the + HTTP server. + type: string + port: + description: Name or number of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not + yet supported TODO: implement a realistic + TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + description: Number or name of the + port to access on the container. + Number must be in the range 1 to + 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as + a DNS_LABEL. Each container in a pod must have + a unique name (DNS_LABEL). Cannot be updated. + type: string + ports: + description: List of ports to expose from the + container. Exposing a port here gives the system + additional information about the network connections + a container uses, but is primarily informational. + Not specifying a port here DOES NOT prevent + that port from being exposed. Any port which + is listening on the default "0.0.0.0" address + inside a container will be accessible from the + network. Cannot be updated. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: Number of port to expose on + the pod's IP address. This must be a valid + port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: Number of port to expose on + the host. If specified, this must be a + valid port number, 0 < x < 65536. If HostNetwork + is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: If specified, this must be + an IANA_SVC_NAME and unique within the + pod. Each named port in a pod must have + a unique name. Name for the port that + can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be + UDP, TCP, or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service + readiness. Container will be removed from service + endpoints if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the + action to take. + properties: + command: + description: Command is the command line + to execute inside the container, the + working directory for the command is + root ('/') in the container's filesystem. + The command is simply exec'd, it is + not run inside a shell, so traditional + shell instructions ('|', etc) won't + work. To use a shell, you need to explicitly + call out to that shell. Exit status + of 0 is treated as live/healthy and + non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures + for the probe to be considered failed after + having succeeded. Defaults to 3. Minimum + value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, + defaults to the pod IP. You probably + want to set "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a + custom header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP + server. + type: string + port: + description: Name or number of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the + container has started before liveness probes + are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform + the probe. Default to 10 seconds. Minimum + value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes + for the probe to be considered successful + after having failed. Defaults to 1. Must + be 1 for liveness. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action + involving a TCP port. TCP hooks not yet + supported TODO: implement a realistic TCP + lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port + to access on the container. Number must + be in the range 1 to 65535. Name must + be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which + the probe times out. Defaults to 1 second. + Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this + container. Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum + amount of compute resources allowed. More + info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum + amount of compute resources required. If + Requests is omitted for a container, it + defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should + run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls + whether a process can gain more privileges + than its parent process. This bool directly + controls if the no_new_privs flag will be + set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) + run as Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop + when running containers. Defaults to the + default set of capabilities granted by the + container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. + Processes in privileged containers are essentially + equivalent to root on the host. Defaults + to false. + type: boolean + procMount: + description: procMount denotes the type of + proc mount to use for the containers. The + default is DefaultProcMount which uses the + container runtime defaults for readonly + paths and masked paths. This requires the + ProcMountType feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a + read-only root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint + of the container process. Uses runtime default + if unset. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container + must run as a non-root user. If true, the + Kubelet will validate the image at runtime + to ensure that it does not run as UID 0 + (root) and fail to start the container if + it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint + of the container process. Defaults to user + specified in image metadata if unspecified. + May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes + precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied + to the container. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified + in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate + a buffer for stdin in the container runtime. + If this is not set, reads from stdin in the + container will always result in EOF. Default + is false. + type: boolean + stdinOnce: + description: Whether the container runtime should + close the stdin channel after it has been opened + by a single attach. When stdin is true the stdin + stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin + is opened on container start, is empty until + the first client attaches to stdin, and then + remains open and accepts data until the client + disconnects, at which time stdin is closed and + remains closed until the container is restarted. + If this flag is false, a container processes + that reads from stdin will never receive an + EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file + to which the container''s termination message + will be written is mounted into the container''s + filesystem. Message written is intended to be + brief final status, such as an assertion failure + message. Will be truncated by the node if greater + than 4096 bytes. The total message length across + all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message + should be populated. File will use the contents + of terminationMessagePath to populate the container + status message on both success and failure. + FallbackToLogsOnError will use the last chunk + of container log output if the termination message + file is empty and the container exited with + an error. The log output is limited to 2048 + bytes or 80 lines, whichever is smaller. Defaults + to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate + a TTY for itself, also requires 'stdin' to be + true. Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. This is + a beta feature. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will + be mapped to. + type: string + name: + description: name must match the name of + a persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: Path within the container at + which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + description: mountPropagation determines + how mounts are propagated from the host + to container and the other way around. + When not set, MountPropagationNone is + used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of + a Volume. + type: string + readOnly: + description: Mounted read-only if true, + read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + subPath: + description: Path within the volume from + which the container's volume should be + mounted. Defaults to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume + from which the container's volume should + be mounted. Behaves similarly to SubPath + but environment variable references $(VAR_NAME) + are expanded using the container's environment. + Defaults to "" (volume's root). SubPathExpr + and SubPath are mutually exclusive. This + field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If + not specified, the container runtime's default + will be used, which might be configured in the + container image. Cannot be updated. + type: string + required: + - name + type: object + type: array + nodeName: + description: NodeName is a request to schedule this + pod onto a specific node. If it is non-empty, the + scheduler simply schedules this pod onto that node, + assuming that it fits resource requirements. + type: string + nodeSelector: + additionalProperties: + type: string + description: 'NodeSelector is a selector which must + be true for the pod to fit on a node. Selector which + must match a node''s labels for the pod to be scheduled + on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/' + type: object + priority: + description: The priority value. Various system components + use this field to find the priority of the pod. When + Priority Admission Controller is enabled, it prevents + users from setting this field. The admission controller + populates this field from PriorityClassName. The higher + the value, the higher the priority. + format: int32 + type: integer + priorityClassName: + description: If specified, indicates the pod's priority. + "system-node-critical" and "system-cluster-critical" + are two special keywords which indicate the highest + priorities with the former being the highest priority. + Any other name must be defined by creating a PriorityClass + object with that name. If not specified, the pod priority + will be default or zero if there is no default. + type: string + readinessGates: + description: 'If specified, all readiness gates will + be evaluated for pod readiness. A pod is ready when + all its containers are ready AND all conditions specified + in the readiness gates have status equal to "True" + More info: https://git.k8s.io/enhancements/keps/sig-network/0007-pod-ready%2B%2B.md' + items: + description: PodReadinessGate contains the reference + to a pod condition + properties: + conditionType: + description: ConditionType refers to a condition + in the pod's condition list with matching type. + type: string + required: + - conditionType + type: object + type: array + restartPolicy: + description: 'Restart policy for all containers within + the pod. One of Always, OnFailure, Never. Default + to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy' + type: string + runtimeClassName: + description: 'RuntimeClassName refers to a RuntimeClass + object in the node.k8s.io group, which should be used + to run this pod. If no RuntimeClass resource matches + the named class, the pod will not be run. If unset + or empty, the "legacy" RuntimeClass will be used, + which is an implicit class with an empty definition + that uses the default runtime handler. More info: + https://git.k8s.io/enhancements/keps/sig-node/runtime-class.md + This is an alpha feature and may change in the future.' + type: string + schedulerName: + description: If specified, the pod will be dispatched + by specified scheduler. If not specified, the pod + will be dispatched by default scheduler. + type: string + securityContext: + description: 'SecurityContext holds pod-level security + attributes and common container settings. Optional: + Defaults to empty. See type description for default + values of each field.' + properties: + fsGroup: + description: "A special supplemental group that + applies to all containers in a pod. Some volume + types allow the Kubelet to change the ownership + of that volume to be owned by the pod: \n 1. The + owning GID will be the FSGroup 2. The setgid bit + is set (new files created in the volume will be + owned by FSGroup) 3. The permission bits are OR'd + with rw-rw---- \n If unset, the Kubelet will not + modify the ownership and permissions of any volume." + format: int64 + type: integer + runAsGroup: + description: The GID to run the entrypoint of the + container process. Uses runtime default if unset. + May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence + for that container. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run + as a non-root user. If true, the Kubelet will + validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start + the container if it does. If unset or false, no + such validation will be performed. May also be + set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in + SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the + container process. Defaults to user specified + in image metadata if unspecified. May also be + set in SecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in + SecurityContext takes precedence for that container. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + all containers. If unspecified, the container + runtime will allocate a random SELinux context + for each container. May also be set in SecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence + for that container. + properties: + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + supplementalGroups: + description: A list of groups applied to the first + process run in each container, in addition to + the container's primary GID. If unspecified, + no groups will be added to any container. + items: + format: int64 + type: integer + type: array + sysctls: + description: Sysctls hold a list of namespaced sysctls + used for the pod. Pods with unsupported sysctls + (by the container runtime) might fail to launch. + items: + description: Sysctl defines a kernel parameter + to be set + properties: + name: + description: Name of a property to set + type: string + value: + description: Value of a property to set + type: string + required: + - name + - value + type: object + type: array + type: object + serviceAccount: + description: 'DeprecatedServiceAccount is a depreciated + alias for ServiceAccountName. Deprecated: Use serviceAccountName + instead.' + type: string + serviceAccountName: + description: 'ServiceAccountName is the name of the + ServiceAccount to use to run this pod. More info: + https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/' + type: string + shareProcessNamespace: + description: 'Share a single process namespace between + all of the containers in a pod. When this is set containers + will be able to view and signal processes from other + containers in the same pod, and the first process + in each container will not be assigned PID 1. HostPID + and ShareProcessNamespace cannot both be set. Optional: + Default to false. This field is beta-level and may + be disabled with the PodShareProcessNamespace feature.' + type: boolean + subdomain: + description: If specified, the fully qualified Pod hostname + will be "...svc.". If not specified, the pod will not have + a domainname at all. + type: string + terminationGracePeriodSeconds: + description: Optional duration in seconds the pod needs + to terminate gracefully. May be decreased in delete + request. Value must be non-negative integer. The value + zero indicates delete immediately. If this value is + nil, the default grace period will be used instead. + The grace period is the duration in seconds after + the processes running in the pod are sent a termination + signal and the time when the processes are forcibly + halted with a kill signal. Set this value longer than + the expected cleanup time for your process. Defaults + to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: The pod this Toleration is attached to + tolerates any taint that matches the triple + using the matching operator . + properties: + effect: + description: Effect indicates the taint effect + to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, + PreferNoSchedule and NoExecute. + type: string + key: + description: Key is the taint key that the toleration + applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; + this combination means to match all values and + all keys. + type: string + operator: + description: Operator represents a key's relationship + to the value. Valid operators are Exists and + Equal. Defaults to Equal. Exists is equivalent + to wildcard for value, so that a pod can tolerate + all taints of a particular category. + type: string + tolerationSeconds: + description: TolerationSeconds represents the + period of time the toleration (which must be + of effect NoExecute, otherwise this field is + ignored) tolerates the taint. By default, it + is not set, which means tolerate the taint forever + (do not evict). Zero and negative values will + be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: Value is the taint value the toleration + matches to. If the operator is Exists, the value + should be empty, otherwise just a regular string. + type: string + type: object + type: array + volumes: + description: 'List of volumes that can be mounted by + containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes' + items: + type: object + type: array + required: + - containers + type: object + type: object + type: array + engineResources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount of compute + resources required. If Requests is omitted for a container, + it defaults to Limits if that is explicitly specified, otherwise + to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + explainer: + properties: + config: + additionalProperties: + type: string + type: object + containerSpec: + description: A single application container that you want + to run within a pod. + properties: + args: + description: 'Arguments to the entrypoint. The docker + image''s CMD is used if this is not provided. Variable + references $(VAR_NAME) are expanded using the container''s + environment. If a variable cannot be resolved, the reference + in the input string will be unchanged. The $(VAR_NAME) + syntax can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + command: + description: 'Entrypoint array. Not executed within a + shell. The docker image''s ENTRYPOINT is used if this + is not provided. Variable references $(VAR_NAME) are + expanded using the container''s environment. If a variable + cannot be resolved, the reference in the input string + will be unchanged. The $(VAR_NAME) syntax can be escaped + with a double $$, ie: $$(VAR_NAME). Escaped references + will never be expanded, regardless of whether the variable + exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell' + items: + type: string + type: array + env: + description: List of environment variables to set in the + container. Cannot be updated. + items: + description: EnvVar represents an environment variable + present in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are + expanded using the previous defined environment + variables in the container and any service environment + variables. If a variable cannot be resolved, the + reference in the input string will be unchanged. + The $(VAR_NAME) syntax can be escaped with a double + $$, ie: $$(VAR_NAME). Escaped references will + never be expanded, regardless of whether the variable + exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap + or it's key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select + in the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for + volumes, optional for env vars' + type: string + divisor: + description: Specifies the output format + of the exposed resources, defaults to + "1" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the + pod's namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More + info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret + or it's key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + envFrom: + description: List of sources to populate environment variables + in the container. The keys defined within a source must + be a C_IDENTIFIER. All invalid keys will be reported + as an event when the container is starting. When a key + exists in multiple sources, the value associated with + the last source will take precedence. Values defined + by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the source of + a set of ConfigMaps + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap must + be defined + type: boolean + type: object + prefix: + description: An optional identifier to prepend to + each key in the ConfigMap. Must be a C_IDENTIFIER. + type: string + secretRef: + description: The Secret to select from + properties: + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret must + be defined + type: boolean + type: object + type: object + type: array + image: + description: 'Docker image name. More info: https://kubernetes.io/docs/concepts/containers/images + This field is optional to allow higher level config + management to default or override container images in + workload controllers like Deployments and StatefulSets.' + type: string + imagePullPolicy: + description: 'Image pull policy. One of Always, Never, + IfNotPresent. Defaults to Always if :latest tag is specified, + or IfNotPresent otherwise. Cannot be updated. More info: + https://kubernetes.io/docs/concepts/containers/images#updating-images' + type: string + lifecycle: + description: Actions that the management system should + take in response to container lifecycle events. Cannot + be updated. + properties: + postStart: + description: 'PostStart is called immediately after + a container is created. If the handler fails, the + container is terminated and restarted according + to its restart policy. Other management of the container + blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') + in the container's filesystem. The command + is simply exec'd, it is not run inside a + shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you + need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + description: 'PreStop is called immediately before + a container is terminated due to an API request + or management event such as liveness probe failure, + preemption, resource contention, etc. The handler + is not called if the container crashes or exits. + The reason for termination is passed to the handler. + The Pod''s termination grace period countdown begins + before the PreStop hooked is executed. Regardless + of the outcome of the handler, the container will + eventually terminate within the Pod''s termination + grace period. Other management of the container + blocks until the hook completes or until the termination + grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks' + properties: + exec: + description: One and only one of the following + should be specified. Exec specifies the action + to take. + properties: + command: + description: Command is the command line to + execute inside the container, the working + directory for the command is root ('/') + in the container's filesystem. The command + is simply exec'd, it is not run inside a + shell, so traditional shell instructions + ('|', etc) won't work. To use a shell, you + need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + httpGet: + description: HTTPGet specifies the http request + to perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting + to the host. Defaults to HTTP. + type: string + required: + - port + type: object + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: + implement a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + description: Number or name of the port to + access on the container. Number must be + in the range 1 to 65535. Name must be an + IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + type: object + livenessProbe: + description: 'Periodic probe of container liveness. Container + will be restarted if the probe fails. Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory + for the command is root ('/') in the container's + filesystem. The command is simply exec'd, it + is not run inside a shell, so traditional shell + instructions ('|', etc) won't work. To use a + shell, you need to explicitly call out to that + shell. Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the + probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + name: + description: Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: List of ports to expose from the container. + Exposing a port here gives the system additional information + about the network connections a container uses, but + is primarily informational. Not specifying a port here + DOES NOT prevent that port from being exposed. Any port + which is listening on the default "0.0.0.0" address + inside a container will be accessible from the network. + Cannot be updated. + items: + description: ContainerPort represents a network port + in a single container. + properties: + containerPort: + description: Number of port to expose on the pod's + IP address. This must be a valid port number, + 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external port + to. + type: string + hostPort: + description: Number of port to expose on the host. + If specified, this must be a valid port number, + 0 < x < 65536. If HostNetwork is specified, this + must match ContainerPort. Most containers do not + need this. + format: int32 + type: integer + name: + description: If specified, this must be an IANA_SVC_NAME + and unique within the pod. Each named port in + a pod must have a unique name. Name for the port + that can be referred to by services. + type: string + protocol: + description: Protocol for port. Must be UDP, TCP, + or SCTP. Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + readinessProbe: + description: 'Periodic probe of container service readiness. + Container will be removed from service endpoints if + the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + properties: + exec: + description: One and only one of the following should + be specified. Exec specifies the action to take. + properties: + command: + description: Command is the command line to execute + inside the container, the working directory + for the command is root ('/') in the container's + filesystem. The command is simply exec'd, it + is not run inside a shell, so traditional shell + instructions ('|', etc) won't work. To use a + shell, you need to explicitly call out to that + shell. Exit status of 0 is treated as live/healthy + and non-zero is unhealthy. + items: + type: string + type: array + type: object + failureThreshold: + description: Minimum consecutive failures for the + probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + httpGet: + description: HTTPGet specifies the http request to + perform. + properties: + host: + description: Host name to connect to, defaults + to the pod IP. You probably want to set "Host" + in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom header + to be used in HTTP probes + properties: + name: + description: The header field name + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + path: + description: Path to access on the HTTP server. + type: string + port: + description: Name or number of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: Scheme to use for connecting to the + host. Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: 'Number of seconds after the container + has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + periodSeconds: + description: How often (in seconds) to perform the + probe. Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: Minimum consecutive successes for the + probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness. Minimum value + is 1. + format: int32 + type: integer + tcpSocket: + description: 'TCPSocket specifies an action involving + a TCP port. TCP hooks not yet supported TODO: implement + a realistic TCP lifecycle hook' + properties: + host: + description: 'Optional: Host name to connect to, + defaults to the pod IP.' + type: string + port: + description: Number or name of the port to access + on the container. Number must be in the range + 1 to 65535. Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + timeoutSeconds: + description: 'Number of seconds after which the probe + times out. Defaults to 1 second. Minimum value is + 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes' + format: int32 + type: integer + type: object + resources: + description: 'Compute Resources required by this container. + Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount + of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount + of compute resources required. If Requests is omitted + for a container, it defaults to Limits if that is + explicitly specified, otherwise to an implementation-defined + value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + securityContext: + description: 'Security options the pod should run with. + More info: https://kubernetes.io/docs/concepts/policy/security-context/ + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/' + properties: + allowPrivilegeEscalation: + description: 'AllowPrivilegeEscalation controls whether + a process can gain more privileges than its parent + process. This bool directly controls if the no_new_privs + flag will be set on the container process. AllowPrivilegeEscalation + is true always when the container is: 1) run as + Privileged 2) has CAP_SYS_ADMIN' + type: boolean + capabilities: + description: The capabilities to add/drop when running + containers. Defaults to the default set of capabilities + granted by the container runtime. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + drop: + description: Removed capabilities + items: + description: Capability represent POSIX capabilities + type + type: string + type: array + type: object + privileged: + description: Run container in privileged mode. Processes + in privileged containers are essentially equivalent + to root on the host. Defaults to false. + type: boolean + procMount: + description: procMount denotes the type of proc mount + to use for the containers. The default is DefaultProcMount + which uses the container runtime defaults for readonly + paths and masked paths. This requires the ProcMountType + feature flag to be enabled. + type: string + readOnlyRootFilesystem: + description: Whether this container has a read-only + root filesystem. Default is false. + type: boolean + runAsGroup: + description: The GID to run the entrypoint of the + container process. Uses runtime default if unset. + May also be set in PodSecurityContext. If set in + both SecurityContext and PodSecurityContext, the + value specified in SecurityContext takes precedence. + format: int64 + type: integer + runAsNonRoot: + description: Indicates that the container must run + as a non-root user. If true, the Kubelet will validate + the image at runtime to ensure that it does not + run as UID 0 (root) and fail to start the container + if it does. If unset or false, no such validation + will be performed. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: The UID to run the entrypoint of the + container process. Defaults to user specified in + image metadata if unspecified. May also be set in + PodSecurityContext. If set in both SecurityContext + and PodSecurityContext, the value specified in SecurityContext + takes precedence. + format: int64 + type: integer + seLinuxOptions: + description: The SELinux context to be applied to + the container. If unspecified, the container runtime + will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If + set in both SecurityContext and PodSecurityContext, + the value specified in SecurityContext takes precedence. + properties: + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + type: object + stdin: + description: Whether this container should allocate a + buffer for stdin in the container runtime. If this is + not set, reads from stdin in the container will always + result in EOF. Default is false. + type: boolean + stdinOnce: + description: Whether the container runtime should close + the stdin channel after it has been opened by a single + attach. When stdin is true the stdin stream will remain + open across multiple attach sessions. If stdinOnce is + set to true, stdin is opened on container start, is + empty until the first client attaches to stdin, and + then remains open and accepts data until the client + disconnects, at which time stdin is closed and remains + closed until the container is restarted. If this flag + is false, a container processes that reads from stdin + will never receive an EOF. Default is false + type: boolean + terminationMessagePath: + description: 'Optional: Path at which the file to which + the container''s termination message will be written + is mounted into the container''s filesystem. Message + written is intended to be brief final status, such as + an assertion failure message. Will be truncated by the + node if greater than 4096 bytes. The total message length + across all containers will be limited to 12kb. Defaults + to /dev/termination-log. Cannot be updated.' + type: string + terminationMessagePolicy: + description: Indicate how the termination message should + be populated. File will use the contents of terminationMessagePath + to populate the container status message on both success + and failure. FallbackToLogsOnError will use the last + chunk of container log output if the termination message + file is empty and the container exited with an error. + The log output is limited to 2048 bytes or 80 lines, + whichever is smaller. Defaults to File. Cannot be updated. + type: string + tty: + description: Whether this container should allocate a + TTY for itself, also requires 'stdin' to be true. Default + is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block devices + to be used by the container. This is a beta feature. + items: + description: volumeDevice describes a mapping of a raw + block device within a container. + properties: + devicePath: + description: devicePath is the path inside of the + container that the device will be mapped to. + type: string + name: + description: name must match the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + volumeMounts: + description: Pod volumes to mount into the container's + filesystem. Cannot be updated. + items: + description: VolumeMount describes a mounting of a Volume + within a container. + properties: + mountPath: + description: Path within the container at which + the volume should be mounted. Must not contain + ':'. + type: string + mountPropagation: + description: mountPropagation determines how mounts + are propagated from the host to container and + the other way around. When not set, MountPropagationNone + is used. This field is beta in 1.10. + type: string + name: + description: This must match the Name of a Volume. + type: string + readOnly: + description: Mounted read-only if true, read-write + otherwise (false or unspecified). Defaults to + false. + type: boolean + subPath: + description: Path within the volume from which the + container's volume should be mounted. Defaults + to "" (volume's root). + type: string + subPathExpr: + description: Expanded path within the volume from + which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable + references $(VAR_NAME) are expanded using the + container's environment. Defaults to "" (volume's + root). SubPathExpr and SubPath are mutually exclusive. + This field is alpha in 1.14. + type: string + required: + - mountPath + - name + type: object + type: array + workingDir: + description: Container's working directory. If not specified, + the container runtime's default will be used, which + might be configured in the container image. Cannot be + updated. + type: string + required: + - name + type: object + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + modelUri: + type: string + serviceAccountName: + type: string + type: + type: string + type: object + graph: + properties: + children: + items: + properties: + children: + items: + properties: + children: + items: + properties: + children: + items: + properties: + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload + logging. v2alpha1 feature that is + added to v1 for backwards compatibility + while v1 is the storage version. + properties: + mode: + description: What payloads to + log + type: string + url: + description: URL to send request + logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. + v2alpha1 feature that is added to v1 for + backwards compatibility while v1 is the + storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging + CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. + v2alpha1 feature that is added to v1 for backwards + compatibility while v1 is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. v2alpha1 + feature that is added to v1 for backwards compatibility + while v1 is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + type: object + type: array + serviceAccountName: + type: string + type: + type: string + type: object + type: array + endpoint: + properties: + service_host: + type: string + service_port: + format: int32 + type: integer + type: + type: string + type: object + envSecretRefName: + type: string + implementation: + type: string + logger: + description: Request/response payload logging. v2alpha1 feature + that is added to v1 for backwards compatibility while v1 + is the storage version. + properties: + mode: + description: What payloads to log + type: string + url: + description: URL to send request logging CloudEvents + type: string + type: object + methods: + items: + type: string + type: array + modelUri: + type: string + name: + type: string + parameters: + items: + properties: + name: + type: string + type: + type: string + value: + type: string + required: + - name + - type + - value + type: object + type: array + serviceAccountName: + type: string + type: + type: string + required: + - name + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + protocol: + type: string + replicas: + format: int32 + type: integer + shadow: + type: boolean + svcOrchSpec: + properties: + env: + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must + be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previous defined environment variables in + the container and any service environment variables. + If a variable cannot be resolved, the reference in + the input string will be unchanged. The $(VAR_NAME) + syntax can be escaped with a double $$, ie: $$(VAR_NAME). + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to + "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or + it's key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports + metadata.name, metadata.namespace, metadata.labels, + metadata.annotations, spec.nodeName, spec.serviceAccountName, + status.hostIP, status.podIP.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in + the specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: + only resources limits and requests (limits.cpu, + limits.memory, limits.ephemeral-storage, requests.cpu, + requests.memory and requests.ephemeral-storage) + are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + description: Specifies the output format of + the exposed resources, defaults to "1" + type: string + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select + from. Must be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: + https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, + kind, uid?' + type: string + optional: + description: Specify whether the Secret or it's + key must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array + resources: + description: ResourceRequirements describes the compute resource + requirements. + properties: + limits: + additionalProperties: + type: string + description: 'Limits describes the maximum amount of compute + resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + requests: + additionalProperties: + type: string + description: 'Requests describes the minimum amount of + compute resources required. If Requests is omitted for + a container, it defaults to Limits if that is explicitly + specified, otherwise to an implementation-defined value. + More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/' + type: object + type: object + type: object + traffic: + format: int32 + type: integer + transport: + type: string + required: + - graph + - name + type: object + type: array + required: + - predictors + type: object + status: + description: SeldonDeploymentStatus defines the observed state of SeldonDeployment + properties: + deploymentStatus: + additionalProperties: + properties: + availableReplicas: + format: int32 + type: integer + description: + type: string + explainerFor: + type: string + name: + type: string + replicas: + format: int32 + type: integer + status: + type: string + type: object + type: object + description: + type: string + serviceStatus: + additionalProperties: + properties: + explainerFor: + type: string + grpcEndpoint: + type: string + httpEndpoint: + type: string + svcName: + type: string + type: object + type: object + state: + type: string + type: object + type: object + version: v1 + versions: + - name: v1 + served: true + storage: true + - name: v1alpha2 + served: true + storage: false + - name: v1alpha3 + served: true + storage: false +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/seldon-operator.v1.0.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/seldon-operator.v1.0.0.clusterserviceversion.yaml new file mode 100644 index 0000000000..5fc7543547 --- /dev/null +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/seldon-operator.v1.0.0.clusterserviceversion.yaml @@ -0,0 +1,500 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: ClusterServiceVersion +metadata: + annotations: + alm-examples: |- + [ + { + "apiVersion": "machinelearning.seldon.io/v1", + "kind": "SeldonDeployment", + "metadata": { + "name": "seldon-model" + }, + "spec": { + "name": "test-deployment", + "predictors": [ + { + "componentSpecs": [ + { + "spec": { + "containers": [ + { + "image": "seldonio/mock_classifier_rest:1.3", + "name": "classifier" + } + ] + } + } + ], + "graph": { + "children": [], + "endpoint": { + "type": "REST" + }, + "name": "classifier", + "type": "MODEL" + }, + "name": "example", + "replicas": 1 + } + ] + } + } + ] + capabilities: Seamless Upgrades + categories: Logging & Tracing + certified: "false" + containerImage: seldonio/seldon-core-operator:1.1.3-SNAPSHOT + createdAt: "2019-05-21 15:00:00" + description: The Seldon operator for management, monitoring and operations of + machine learning systems through the Seldon Engine. Once installed, the Seldon + Operator provides multiple functions which facilitate the productisation, monitoring + and maintenance of machine learning systems at scale. + repository: https://github.com/SeldonIO/seldon-core + support: Clive Cox + name: seldon-operator.v1.0.0 + namespace: seldon-operator-system +spec: + apiservicedefinitions: {} + customresourcedefinitions: + owned: + - description: A seldon engine deployment + displayName: Seldon Delpoyment + kind: SeldonDeployment + name: seldondeployments.machinelearning.seldon.io + resources: + - kind: SeldonDeployment + name: "" + version: v1 + - kind: Deployment + name: "" + version: v1 + - kind: ConfigMap + name: "" + version: v1 + - kind: Namespace + name: "" + version: v1 + - kind: Service + name: "" + version: v1 + - kind: Event + name: "" + version: v1 + - kind: HorizontalPodAutoscaler + name: "" + version: v2beta1 + - kind: MutatingWebhookConfiguration + name: "" + version: v1beta1 + - kind: ValidatingWebhookConfiguration + name: "" + version: v1beta1 + - kind: customresourcedefinitions + name: "" + version: v1beta1 + specDescriptors: + - description: Name of the seldon deployment + displayName: name + path: name + - description: List of predictors + displayName: predictors + path: predictors + statusDescriptors: + - description: State of the SeldonDeployment + displayName: state + path: state + - description: State of the services created from the SeldonDeployment + displayName: serviceStatus + path: serviceStatus + - description: State of the deployments created from the SeldonDeployment + displayName: deploymentStatus + path: deploymentStatus + version: v1 + description: "The Seldon operator enables for native operation of production machine + learning workloads, including monitoring and operations of language-agnostic models + with the benefits of real-time metrics and log analysis.\n \n## Overview\nSeldon + Core is an open source platform for deploying machine learning models on a Kubernetes + cluster.\n\n* Deploy machine learning models in the cloud or on-premise.\n* Get + metrics and ensure proper governance and compliance for your running machine learning + models.\n* Create powerful inference graphs made up of multiple components.\n* + Provide a consistent serving layer for models built using heterogeneous ML toolkits.\n\nYou + can get started by following the guides in our documentation at https://docs.seldon.io/projects/seldon-core/en/latest/workflow/README.html\n" + displayName: Seldon Operator + icon: + - base64data: /9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCAChAegDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD9U6KKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiio7i4is7eWeeVIYIlLySS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UUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf/9k= + mediatype: image/jpeg + install: + spec: + clusterPermissions: + - rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - serviceaccounts + verbs: + - get + - list + - watch + - apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + - validatingwebhookconfigurations + verbs: + - get + - list + - create + - update + - apiGroups: + - apps + resources: + - deployments/finalizers + verbs: + - get + - patch + - update + - apiGroups: + - "" + resources: + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + resources: + - deployments/status + verbs: + - get + - patch + - update + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers/status + verbs: + - get + - patch + - update + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/finalizers + verbs: + - get + - patch + - update + - apiGroups: + - machinelearning.seldon.io + resources: + - seldondeployments/status + verbs: + - get + - patch + - update + - apiGroups: + - networking.istio.io + resources: + - destinationrules + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - networking.istio.io + resources: + - destinationrules/status + verbs: + - get + - patch + - update + - apiGroups: + - networking.istio.io + resources: + - virtualservices + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - networking.istio.io + resources: + - virtualservices/status + verbs: + - get + - patch + - update + - apiGroups: + - v1 + resources: + - namespaces + verbs: + - get + - list + - watch + - apiGroups: + - v1 + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - v1 + resources: + - services/status + verbs: + - get + - patch + - update + serviceAccountName: seldon-manager + deployments: + - name: seldon-controller-manager + spec: + replicas: 1 + selector: + matchLabels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + control-plane: seldon-controller-manager + strategy: {} + template: + metadata: + annotations: + sidecar.istio.io/inject: "false" + labels: + app: seldon + app.kubernetes.io/instance: seldon1 + app.kubernetes.io/name: seldon + app.kubernetes.io/version: v0.5 + control-plane: seldon-controller-manager + spec: + containers: + - args: + - --enable-leader-election + - --webhook-port=443 + - --create-resources=$(CREATE_RESOURCES) + command: + - /manager + env: + - name: WATCH_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.annotations['olm.targetNamespaces'] + - name: CREATE_RESOURCES + value: "true" + - name: POD_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CONTROLLER_ID + - name: AMBASSADOR_ENABLED + value: "true" + - name: AMBASSADOR_SINGLE_NAMESPACE + value: "false" + - name: ENGINE_CONTAINER_IMAGE_AND_VERSION + value: docker.io/seldonio/engine:1.1.0-SNAPSHOT + - name: ENGINE_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + - name: ENGINE_CONTAINER_USER + value: "8888" + - name: ENGINE_LOG_MESSAGES_EXTERNALLY + value: "false" + - name: PREDICTIVE_UNIT_SERVICE_PORT + value: "9000" + - name: ENGINE_SERVER_GRPC_PORT + value: "5001" + - name: ENGINE_SERVER_PORT + value: "8000" + - name: ENGINE_PROMETHEUS_PATH + value: /prometheus + - name: ISTIO_ENABLED + value: "false" + - name: ISTIO_GATEWAY + value: seldon-gateway + - name: ISTIO_TLS_MODE + - name: USE_EXECUTOR + value: "true" + - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION + value: seldonio/seldon-core-executor:1.1.0-SNAPSHOT + - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY + value: IfNotPresent + - name: EXECUTOR_PROMETHEUS_PATH + value: /prometheus + - name: EXECUTOR_SERVER_GRPC_PORT + value: "5001" + - name: EXECUTOR_SERVER_PORT + value: "8000" + - name: EXECUTOR_CONTAINER_USER + value: "8888" + - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME + value: default + image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT + name: manager + ports: + - containerPort: 443 + name: webhook-server + protocol: TCP + resources: + limits: + cpu: 500m + memory: 300Mi + requests: + cpu: 100m + memory: 200Mi + serviceAccountName: seldon-manager + terminationGracePeriodSeconds: 10 + permissions: + - rules: + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - create + - update + - patch + - delete + - apiGroups: + - "" + resources: + - configmaps/status + verbs: + - get + - update + - patch + - apiGroups: + - "" + resources: + - events + verbs: + - create + - apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + serviceAccountName: seldon-manager + strategy: deployment + installModes: + - supported: true + type: OwnNamespace + - supported: true + type: SingleNamespace + - supported: false + type: MultiNamespace + - supported: true + type: AllNamespaces + keywords: + - mlops + - aiops + - production + - monitoring + labels: + name: seldon-operator + links: + - name: Website + url: https://www.seldon.io/ + - name: Documentation + url: https://docs.seldon.io/projects/seldon-core/en/latest/ + maintainers: + - email: hello@seldon.io + name: Seldon Technologies + maturity: alpha + minKubeVersion: 1.13.0 + provider: + name: Seldon Technologies + replaces: seldonoperator.v0.1.5 + selector: + matchLabels: + name: seldon-operator + version: 1.0.0 diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index c4840345ac..a2ed881cb8 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -402,6 +402,7 @@ spec: value: "false" - name: PREDICTIVE_UNIT_SERVICE_PORT value: "9000" + - name: PREDICTIVE_UNIT_DEFAULT_ENV_SECRET_REF_NAME - name: ENGINE_SERVER_GRPC_PORT value: "5001" - name: ENGINE_SERVER_PORT @@ -415,7 +416,6 @@ spec: - name: ISTIO_TLS_MODE - name: USE_EXECUTOR value: "true" - - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION value: seldonio/seldon-core-executor:1.1.0-SNAPSHOT - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY @@ -430,8 +430,9 @@ spec: value: "8888" - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default + - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX + value: http://default-broker. image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT - imagePullPolicy: Always name: manager ports: - containerPort: 443 diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml index eabb32df7c..eddabfd38d 100644 --- a/operator/seldon-operator/deploy/operator.yaml +++ b/operator/seldon-operator/deploy/operator.yaml @@ -67,6 +67,8 @@ spec: value: 'false' - name: PREDICTIVE_UNIT_SERVICE_PORT value: '9000' + - name: PREDICTIVE_UNIT_DEFAULT_ENV_SECRET_REF_NAME + value: '' - name: ENGINE_SERVER_GRPC_PORT value: '5001' - name: ENGINE_SERVER_PORT @@ -81,8 +83,6 @@ spec: value: '' - name: USE_EXECUTOR value: 'true' - - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT - value: '' - name: EXECUTOR_CONTAINER_IMAGE_AND_VERSION value: seldonio/seldon-core-executor:1.1.0-SNAPSHOT - name: EXECUTOR_CONTAINER_IMAGE_PULL_POLICY @@ -97,6 +97,8 @@ spec: value: '8888' - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default + - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX + value: http://default-broker. image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT name: manager ports: diff --git a/operator/seldon-operator/testing/openshift/README.md b/operator/seldon-operator/testing/openshift/README.md index 8ee06d5eee..5461979434 100644 --- a/operator/seldon-operator/testing/openshift/README.md +++ b/operator/seldon-operator/testing/openshift/README.md @@ -2,3 +2,4 @@ Follow https://github.com/operator-framework/community-operators/blob/master/docs/testing-operators.md#testing-operator-deployment-on-openshift +You can use the operator source in this folder but will need to upload bundle to quay. diff --git a/operator/seldon-operator/testing/standalone/README.md b/operator/seldon-operator/testing/standalone/README.md new file mode 100644 index 0000000000..9069a59cb2 --- /dev/null +++ b/operator/seldon-operator/testing/standalone/README.md @@ -0,0 +1,33 @@ +## Standalone Test + +There are two versions + + * create_standalone.sh : create clusterwide operator + * create_standalone_namespace.sh : create namespaced operator in default namespace + +Each creates everything that would be created by OLM and runs the Operator deployment as last step. + +## Clusterwide + +``` +./create_standalone.sh +``` + +Run some models then: + +``` +delete_standalone.sh +``` + +## Namespaced + +``` +./create_standalone_namespace.sh +``` + +Run some models then: + +``` +delete_standalone.sh +``` + From 0b5133ac8439439dd1fe49e78122bc90b5f339b2 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Wed, 18 Mar 2020 18:50:31 +0000 Subject: [PATCH 19/34] Update release process --- operator/seldon-operator/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/operator/seldon-operator/README.md b/operator/seldon-operator/README.md index 7dec608996..8aed8ec1b6 100644 --- a/operator/seldon-operator/README.md +++ b/operator/seldon-operator/README.md @@ -172,3 +172,24 @@ Follow quay bundle upload above. See [testing/openshift/README.md](testing/openshift/README.md). +## Release Process onto RedHat channels + +After a Seldon Release has taken place. + + * Update versions of images by running above updates and ensuring images referenced in the CSV are for the last release. + * Run above tests to check all works ok. + +For community operators: + + * Create a fork of https://github.com/operator-framework/community-operators and update Seldon and create a new PR + +For certified operators: + + * Create UBI images for operator, executor and engine. + * Create a new release on https://connect.redhat.com/content/seldon-core with + * new ubi images + * new bundle that refrences then. TODO: create bundle from community bundle. + +For Marketplace: + + * Update Seldon on marketplace. TODO: add link. \ No newline at end of file From d61b5f8eab6b2cdd0c097ac1573b557651b266a5 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Fri, 10 Apr 2020 20:43:34 +0100 Subject: [PATCH 20/34] openshift updates from testing - gateway in istio-system, no user id set for openshift so can be set automaticlally --- Makefile | 4 +- core-builder/Dockerfile | 3 + helm-charts/seldon-core-operator/values.yaml | 5 +- jenkins-x-integration.yml | 2 +- jenkins-x-lint.yml | 2 +- jenkins-x-notebooks.yml | 2 +- jenkins-x.yml | 4 +- notebooks/istio_example.ipynb | 2 +- notebooks/resources/seldon-gateway.yaml | 1 + operator/Makefile | 2 +- operator/config/manager/manager.yaml | 2 +- operator/config/webhook/service.yaml | 2 +- operator/controllers/replicas_test.go | 12 +- operator/controllers/security.go | 47 ++++++ operator/controllers/security_test.go | 70 +++++++++ .../seldondeployment_controller.go | 25 ++-- .../seldondeployment_controller_test.go | 4 +- .../controllers/seldondeployment_engine.go | 43 +----- .../seldondeployment_engine_test.go | 20 +++ .../seldondeployment_explainers.go | 4 +- .../seldondeployment_explainers_test.go | 138 +++++++++++++++++- .../seldondeployment_prepackaged_servers.go | 6 +- ...ldondeployment_prepackaged_servers_test.go | 95 +++++++++++- operator/controllers/suite_test.go | 8 + operator/go.mod | 3 +- operator/go.sum | 6 + operator/seldon-operator/README.md | 1 + .../seldon-operator/deploy/cluster_role.yaml | 7 + ...operator.v1.0.0.clusterserviceversion.yaml | 6 + ...operator.v1.1.0.clusterserviceversion.yaml | 23 ++- operator/seldon-operator/deploy/operator.yaml | 10 +- operator/seldon-operator/deploy/role.yaml | 7 + .../seldon-operator/hack/create_resources.py | 26 ++++ .../testing/openshift/operator-group.yaml | 8 + .../operator-subscription-istio.yaml | 14 ++ release | 2 +- testing/resources/seldon-gateway.yaml | 1 + testing/scripts/Makefile | 2 +- testing/scripts/conftest.py | 4 +- testing/scripts/test_local_operators.py | 4 +- testing/scripts/test_rolling_updates.py | 14 +- 41 files changed, 540 insertions(+), 101 deletions(-) create mode 100644 operator/controllers/security.go create mode 100644 operator/controllers/security_test.go create mode 100644 operator/seldon-operator/testing/openshift/operator-group.yaml create mode 100644 operator/seldon-operator/testing/openshift/operator-subscription-istio.yaml diff --git a/Makefile b/Makefile index 27bc27dc63..46a136c5e5 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ run_core_builder_in_host: -v /var/run/docker.sock:/var/run/docker.sock \ -v $${HOME}/.m2:/root/.m2 \ -v $(SELDON_CORE_LOCAL_DIR):/work \ - seldonio/core-builder:0.13 bash + seldonio/core-builder:0.14 bash run_core_builder_in_minikube: @@ -37,7 +37,7 @@ run_core_builder_in_minikube: -v /var/run/docker.sock:/var/run/docker.sock \ -v /home/docker/.m2:/root/.m2 \ -v $(SELDON_CORE_VM_DIR):/work \ - seldonio/core-builder:0.13 bash + seldonio/core-builder:0.14 bash show_paths: @echo "local: $(SELDON_CORE_LOCAL_DIR)" diff --git a/core-builder/Dockerfile b/core-builder/Dockerfile index d21cf3bd8b..2abe347df3 100644 --- a/core-builder/Dockerfile +++ b/core-builder/Dockerfile @@ -125,6 +125,9 @@ ENV PATH="${PATH}:/root/go/bin" COPY dev_requirements.txt /tmp/requirements.txt RUN pip install -r /tmp/requirements.txt +# Ginkgo +RUN go get -u github.com/onsi/ginkgo/ginkgo + WORKDIR /work # Define default command. diff --git a/helm-charts/seldon-core-operator/values.yaml b/helm-charts/seldon-core-operator/values.yaml index 1dfd1f07d3..22e33b2eb8 100644 --- a/helm-charts/seldon-core-operator/values.yaml +++ b/helm-charts/seldon-core-operator/values.yaml @@ -12,7 +12,7 @@ ambassador: # You must make sure you create the seldon-gateway as well istio: enabled: false - gateway: seldon-gateway + gateway: istio-system/seldon-gateway tlsMode: "" # ## Install with Cert Manager @@ -25,6 +25,9 @@ certManager: # to specifci namespaces you can set the controllerId controllerId: "" +# Whether to create the webhook service, and webhookconfigurations on startup +createResources: false + # ## Service Orchestrator (Executor) # The executor is the default service orchestrator which has superceeded the "Java Engine" executor: diff --git a/jenkins-x-integration.yml b/jenkins-x-integration.yml index 01406f8649..d7be0252e4 100644 --- a/jenkins-x-integration.yml +++ b/jenkins-x-integration.yml @@ -4,7 +4,7 @@ pipelineConfig: pullRequest: pipeline: agent: - image: seldonio/core-builder:0.13 + image: seldonio/core-builder:0.14 stages: - name: pr-build-comment steps: diff --git a/jenkins-x-lint.yml b/jenkins-x-lint.yml index 0305d5f14b..ae460a3b9f 100644 --- a/jenkins-x-lint.yml +++ b/jenkins-x-lint.yml @@ -4,7 +4,7 @@ pipelineConfig: pullRequest: pipeline: agent: - image: seldonio/core-builder:0.13 + image: seldonio/core-builder:0.14 stages: - name: pr-build-comment steps: diff --git a/jenkins-x-notebooks.yml b/jenkins-x-notebooks.yml index 3c01d936ed..a418505d66 100644 --- a/jenkins-x-notebooks.yml +++ b/jenkins-x-notebooks.yml @@ -4,7 +4,7 @@ pipelineConfig: pullRequest: pipeline: agent: - image: seldonio/core-builder:0.13 + image: seldonio/core-builder:0.14 stages: - name: pr-build-comment steps: diff --git a/jenkins-x.yml b/jenkins-x.yml index ffaa8c06f3..a336dc3c68 100644 --- a/jenkins-x.yml +++ b/jenkins-x.yml @@ -10,7 +10,7 @@ pipelineConfig: pullRequest: pipeline: agent: - image: seldonio/core-builder:0.13 + image: seldonio/core-builder:0.14 stages: - name: pr-build-comment steps: @@ -68,7 +68,7 @@ pipelineConfig: command: echo "skipping tag" pipeline: agent: - image: seldonio/core-builder:0.13 + image: seldonio/core-builder:0.14 stages: - name: build-and-push steps: diff --git a/notebooks/istio_example.ipynb b/notebooks/istio_example.ipynb index 6b7d127f35..032766acef 100644 --- a/notebooks/istio_example.ipynb +++ b/notebooks/istio_example.ipynb @@ -59,7 +59,7 @@ }, "outputs": [], "source": [ - "!kubectl create -f resources/seldon-gateway.yaml" + "!kubectl create -f resources/seldon-gateway.yaml -n istio-system" ] }, { diff --git a/notebooks/resources/seldon-gateway.yaml b/notebooks/resources/seldon-gateway.yaml index faf047a7e4..4b8e194437 100644 --- a/notebooks/resources/seldon-gateway.yaml +++ b/notebooks/resources/seldon-gateway.yaml @@ -2,6 +2,7 @@ apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: seldon-gateway + namespace: istio-system spec: selector: istio: ingressgateway # use istio default controller diff --git a/operator/Makefile b/operator/Makefile index 66dbdfc8c6..c7cee0f80b 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -22,7 +22,7 @@ all: manager # Run tests test: generate fmt vet manifests generate-resources - go test ./controllers/... ./utils/... ./apis/... -coverprofile cover.out + ginkgo -r -outputdir=. -cover -coverprofile=cover.out ./controllers ./utils ./apis # Build manager binary manager: generate fmt vet diff --git a/operator/config/manager/manager.yaml b/operator/config/manager/manager.yaml index 41cbaceb91..ace99e6b61 100644 --- a/operator/config/manager/manager.yaml +++ b/operator/config/manager/manager.yaml @@ -74,7 +74,7 @@ spec: - name: ISTIO_ENABLED value: "false" - name: ISTIO_GATEWAY - value: seldon-gateway + value: istio-system/seldon-gateway - name: ISTIO_TLS_MODE value: "" - name: USE_EXECUTOR diff --git a/operator/config/webhook/service.yaml b/operator/config/webhook/service.yaml index 629ad7953e..a153144f5a 100644 --- a/operator/config/webhook/service.yaml +++ b/operator/config/webhook/service.yaml @@ -7,6 +7,6 @@ metadata: spec: ports: - port: 443 - targetPort: 443 + targetPort: webhook-server selector: control-plane: seldon-controller-manager diff --git a/operator/controllers/replicas_test.go b/operator/controllers/replicas_test.go index 53c93ea954..646faedb2f 100644 --- a/operator/controllers/replicas_test.go +++ b/operator/controllers/replicas_test.go @@ -72,7 +72,7 @@ func TestDeploymentReplicas(t *testing.T) { // Just Predictor Replicas instance := createSeldonDeploymentWithReplicas(name, namespace, nil, &predictorReplicas, nil, nil) instance.Spec.DefaultSeldonDeployment(name, namespace) - c, err := reconciler.createComponents(instance, logger) + c, err := reconciler.createComponents(instance, nil, logger) g.Expect(err).To(BeNil()) g.Expect(len(c.deployments)).To(Equal(1)) g.Expect(*c.deployments[0].Spec.Replicas).To(Equal(predictorReplicas)) @@ -80,7 +80,7 @@ func TestDeploymentReplicas(t *testing.T) { // Just Predictor Replicas and default replicas instance = createSeldonDeploymentWithReplicas(name, namespace, &specReplicas, &predictorReplicas, nil, nil) instance.Spec.DefaultSeldonDeployment(name, namespace) - c, err = reconciler.createComponents(instance, logger) + c, err = reconciler.createComponents(instance, nil, logger) g.Expect(err).To(BeNil()) g.Expect(len(c.deployments)).To(Equal(1)) g.Expect(*c.deployments[0].Spec.Replicas).To(Equal(predictorReplicas)) @@ -88,7 +88,7 @@ func TestDeploymentReplicas(t *testing.T) { // ComponentSpec replica override instance = createSeldonDeploymentWithReplicas(name, namespace, &specReplicas, &predictorReplicas, &componentSpecReplicas, nil) instance.Spec.DefaultSeldonDeployment(name, namespace) - c, err = reconciler.createComponents(instance, logger) + c, err = reconciler.createComponents(instance, nil, logger) g.Expect(err).To(BeNil()) g.Expect(len(c.deployments)).To(Equal(1)) g.Expect(*c.deployments[0].Spec.Replicas).To(Equal(componentSpecReplicas)) @@ -96,7 +96,7 @@ func TestDeploymentReplicas(t *testing.T) { // Just specReplicas instance = createSeldonDeploymentWithReplicas(name, namespace, &specReplicas, nil, nil, nil) instance.Spec.DefaultSeldonDeployment(name, namespace) - c, err = reconciler.createComponents(instance, logger) + c, err = reconciler.createComponents(instance, nil, logger) g.Expect(err).To(BeNil()) g.Expect(len(c.deployments)).To(Equal(1)) g.Expect(*c.deployments[0].Spec.Replicas).To(Equal(specReplicas)) @@ -104,7 +104,7 @@ func TestDeploymentReplicas(t *testing.T) { // All nil instance = createSeldonDeploymentWithReplicas(name, namespace, nil, nil, nil, nil) instance.Spec.DefaultSeldonDeployment(name, namespace) - c, err = reconciler.createComponents(instance, logger) + c, err = reconciler.createComponents(instance, nil, logger) g.Expect(err).To(BeNil()) g.Expect(len(c.deployments)).To(Equal(1)) g.Expect(c.deployments[0].Spec.Replicas).To(BeNil()) @@ -112,7 +112,7 @@ func TestDeploymentReplicas(t *testing.T) { // SvcOrchReplicas instance = createSeldonDeploymentWithReplicas(name, namespace, nil, nil, nil, &svcOrchReplicas) instance.Spec.DefaultSeldonDeployment(name, namespace) - c, err = reconciler.createComponents(instance, logger) + c, err = reconciler.createComponents(instance, nil, logger) g.Expect(err).To(BeNil()) g.Expect(len(c.deployments)).To(Equal(2)) g.Expect(*c.deployments[0].Spec.Replicas).To(Equal(svcOrchReplicas)) diff --git a/operator/controllers/security.go b/operator/controllers/security.go new file mode 100644 index 0000000000..7b73b47173 --- /dev/null +++ b/operator/controllers/security.go @@ -0,0 +1,47 @@ +package controllers + +import ( + machinelearningv1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1" + corev1 "k8s.io/api/core/v1" + "strconv" +) + +func getSvcOrchUser(mlDep *machinelearningv1.SeldonDeployment) (*int64, error) { + + if isExecutorEnabled(mlDep) { + if envExecutorUser != "" { + user, err := strconv.Atoi(envExecutorUser) + if err != nil { + return nil, err + } else { + engineUser := int64(user) + return &engineUser, nil + } + } + + } else { + if envEngineUser != "" { + user, err := strconv.Atoi(envEngineUser) + if err != nil { + return nil, err + } else { + engineUser := int64(user) + return &engineUser, nil + } + } + } + return nil, nil +} + +func createSecurityContext(mlDep *machinelearningv1.SeldonDeployment) (*corev1.PodSecurityContext, error) { + svcOrchUser, err := getSvcOrchUser(mlDep) + if err != nil { + return nil, err + } + if svcOrchUser != nil { + return &corev1.PodSecurityContext{ + RunAsUser: svcOrchUser, + }, nil + } + return nil, nil +} diff --git a/operator/controllers/security_test.go b/operator/controllers/security_test.go new file mode 100644 index 0000000000..363629b4e8 --- /dev/null +++ b/operator/controllers/security_test.go @@ -0,0 +1,70 @@ +package controllers + +import ( + . "github.com/onsi/gomega" + machinelearningv1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + ctrl "sigs.k8s.io/controller-runtime" + "testing" +) + +func TestSecurityContextCreateComponents(t *testing.T) { + g := NewGomegaWithT(t) + + name := "test" + namespace := "default" + + instance := createSeldonDeploymentWithReplicas(name, namespace, nil, nil, nil, nil) + instance.Spec.DefaultSeldonDeployment(name, namespace) + logger := ctrl.Log.WithName("controllers").WithName("SeldonDeployment") + reconciler := &SeldonDeploymentReconciler{ + Log: logger, + } + + user := int64(2) + podSecurityContext := &corev1.PodSecurityContext{ + RunAsUser: &user, + } + c, err := reconciler.createComponents(instance, podSecurityContext, reconciler.Log) + g.Expect(err).To(BeNil()) + g.Expect(len(c.deployments)).To(Equal(1)) + g.Expect(*c.deployments[0].Spec.Template.Spec.SecurityContext.RunAsUser).To(Equal(user)) +} + +func TestNoSecurityContextCreateComponents(t *testing.T) { + g := NewGomegaWithT(t) + + name := "test" + namespace := "default" + + instance := createSeldonDeploymentWithReplicas(name, namespace, nil, nil, nil, nil) + instance.Spec.DefaultSeldonDeployment(name, namespace) + logger := ctrl.Log.WithName("controllers").WithName("SeldonDeployment") + reconciler := &SeldonDeploymentReconciler{ + Log: logger, + } + + var podSecurityContext *corev1.PodSecurityContext + c, err := reconciler.createComponents(instance, podSecurityContext, reconciler.Log) + g.Expect(err).To(BeNil()) + g.Expect(len(c.deployments)).To(Equal(1)) + g.Expect(c.deployments[0].Spec.Template.Spec.SecurityContext).To(BeNil()) +} + +func TestGetSecurityContextExecutorUser(t *testing.T) { + g := NewGomegaWithT(t) + mlDep := &machinelearningv1.SeldonDeployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: "test", + Namespace: "test", + }, + Spec: machinelearningv1.SeldonDeploymentSpec{Annotations: map[string]string{machinelearningv1.ANNOTATION_EXECUTOR: "true"}}, + } + envExecutorUser = "2" + + sc, err := createSecurityContext(mlDep) + g.Expect(err).To(BeNil()) + g.Expect(sc).ToNot(BeNil()) + g.Expect(*sc.RunAsUser).To(Equal(int64(2))) +} diff --git a/operator/controllers/seldondeployment_controller.go b/operator/controllers/seldondeployment_controller.go index f64e9aaec9..f5a045f034 100644 --- a/operator/controllers/seldondeployment_controller.go +++ b/operator/controllers/seldondeployment_controller.go @@ -348,7 +348,7 @@ func getEngineGrpcPort() (engine_grpc_port int, err error) { } // Create all the components (Deployments, Services etc) -func (r *SeldonDeploymentReconciler) createComponents(mlDep *machinelearningv1.SeldonDeployment, log logr.Logger) (*components, error) { +func (r *SeldonDeploymentReconciler) createComponents(mlDep *machinelearningv1.SeldonDeployment, securityContext *corev1.PodSecurityContext, log logr.Logger) (*components, error) { c := components{} c.serviceDetails = map[string]*machinelearningv1.ServiceStatus{} seldonId := machinelearningv1.GetSeldonDeploymentName(mlDep) @@ -399,6 +399,9 @@ func (r *SeldonDeploymentReconciler) createComponents(mlDep *machinelearningv1.S if err != nil { return nil, err } + if securityContext != nil { + deploy.Spec.Template.Spec.SecurityContext = securityContext + } c.deployments = append(c.deployments, deploy) } @@ -415,8 +418,7 @@ func (r *SeldonDeploymentReconciler) createComponents(mlDep *machinelearningv1.S if i == 0 && j == 0 { c.defaultDeploymentName = depName } - deploy := createDeploymentWithoutEngine(depName, seldonId, cSpec, &p, mlDep) - + deploy := createDeploymentWithoutEngine(depName, seldonId, cSpec, &p, mlDep, securityContext) // Add HPA if needed if cSpec.HpaSpec != nil { c.hpas = append(c.hpas, createHpa(cSpec, depName, seldonId, namespace)) @@ -494,7 +496,7 @@ func (r *SeldonDeploymentReconciler) createComponents(mlDep *machinelearningv1.S c.deployments = append(c.deployments, deploy) } - err = createStandaloneModelServers(r, mlDep, &p, &c, p.Graph) + err = createStandaloneModelServers(r, mlDep, &p, &c, p.Graph, securityContext) if err != nil { return nil, err } @@ -571,7 +573,7 @@ func (r *SeldonDeploymentReconciler) createComponents(mlDep *machinelearningv1.S externalPorts[i] = httpGrpcPorts{httpPort: httpPort, grpcPort: grpcPort} } - err = createExplainer(r, mlDep, &p, &c, pSvcName, log) + err = createExplainer(r, mlDep, &p, &c, pSvcName, securityContext, log) if err != nil { return nil, err } @@ -771,7 +773,7 @@ func createContainerService(deploy *appsv1.Deployment, return svc } -func createDeploymentWithoutEngine(depName string, seldonId string, seldonPodSpec *machinelearningv1.SeldonPodSpec, p *machinelearningv1.PredictorSpec, mlDep *machinelearningv1.SeldonDeployment) *appsv1.Deployment { +func createDeploymentWithoutEngine(depName string, seldonId string, seldonPodSpec *machinelearningv1.SeldonPodSpec, p *machinelearningv1.PredictorSpec, mlDep *machinelearningv1.SeldonDeployment, podSecurityContext *corev1.PodSecurityContext) *appsv1.Deployment { deploy := &appsv1.Deployment{ ObjectMeta: metav1.ObjectMeta{ Name: depName, @@ -827,6 +829,9 @@ func createDeploymentWithoutEngine(depName string, seldonId string, seldonPodSpe } } + // Add Pod Security Context + deploy.Spec.Template.Spec.SecurityContext = podSecurityContext + // add predictor labels for k, v := range p.Labels { deploy.ObjectMeta.Labels[k] = v @@ -850,9 +855,6 @@ func createDeploymentWithoutEngine(depName string, seldonId string, seldonPodSpe if deploy.Spec.Template.Spec.SchedulerName == "" { deploy.Spec.Template.Spec.SchedulerName = "default-scheduler" } - if deploy.Spec.Template.Spec.SecurityContext == nil { - deploy.Spec.Template.Spec.SecurityContext = &corev1.PodSecurityContext{} - } var terminationGracePeriod int64 = 20 deploy.Spec.Template.Spec.TerminationGracePeriodSeconds = &terminationGracePeriod @@ -1422,6 +1424,9 @@ func (r *SeldonDeploymentReconciler) Reconcile(req ctrl.Request) (ctrl.Result, e return ctrl.Result{}, nil } + //Get Security Context + podSecurityContext, err := createSecurityContext(instance) + //rerun defaulting before := instance.DeepCopy() instance.Default() @@ -1434,7 +1439,7 @@ func (r *SeldonDeploymentReconciler) Reconcile(req ctrl.Request) (ctrl.Result, e } } - components, err := r.createComponents(instance, log) + components, err := r.createComponents(instance, podSecurityContext, log) if err != nil { r.Recorder.Eventf(instance, corev1.EventTypeWarning, constants.EventsInternalError, err.Error()) r.updateStatusForError(instance, err, log) diff --git a/operator/controllers/seldondeployment_controller_test.go b/operator/controllers/seldondeployment_controller_test.go index 04e5eb086b..e70feba9fb 100644 --- a/operator/controllers/seldondeployment_controller_test.go +++ b/operator/controllers/seldondeployment_controller_test.go @@ -869,7 +869,7 @@ func TestCreateDeploymentWithLabelsAndAnnotations(t *testing.T) { }, } - dep := createDeploymentWithoutEngine(depName, "a", instance.Spec.Predictors[0].ComponentSpecs[0], &instance.Spec.Predictors[0], instance) + dep := createDeploymentWithoutEngine(depName, "a", instance.Spec.Predictors[0].ComponentSpecs[0], &instance.Spec.Predictors[0], instance, nil) g.Expect(dep.Labels[labelKey1]).To(Equal(labelValue1)) g.Expect(dep.Labels[labelKey2]).To(Equal(labelValue2)) g.Expect(dep.Spec.Template.ObjectMeta.Labels[labelKey1]).To(Equal(labelValue1)) @@ -914,5 +914,5 @@ func TestCreateDeploymentWithNoLabelsAndAnnotations(t *testing.T) { }, } - _ = createDeploymentWithoutEngine(depName, "a", instance.Spec.Predictors[0].ComponentSpecs[0], &instance.Spec.Predictors[0], instance) + _ = createDeploymentWithoutEngine(depName, "a", instance.Spec.Predictors[0].ComponentSpecs[0], &instance.Spec.Predictors[0], instance, nil) } diff --git a/operator/controllers/seldondeployment_engine.go b/operator/controllers/seldondeployment_engine.go index 5f3787c9b1..70b87c094f 100644 --- a/operator/controllers/seldondeployment_engine.go +++ b/operator/controllers/seldondeployment_engine.go @@ -35,6 +35,9 @@ const ( ENV_DEFAULT_EXECUTOR_SERVER_GRPC_PORT = "EXECUTOR_SERVER_GRPC_PORT" ENV_EXECUTOR_PROMETHEUS_PATH = "EXECUTOR_PROMETHEUS_PATH" ENV_ENGINE_PROMETHEUS_PATH = "ENGINE_PROMETHEUS_PATH" + ENV_EXECUTOR_USER = "EXECUTOR_CONTAINER_USER" + ENV_ENGINE_USER = "ENGINE_CONTAINER_USER" + ENV_USE_EXECUTOR = "USE_EXECUTOR" DEFAULT_EXECUTOR_CONTAINER_PORT = 8000 DEFAULT_EXECUTOR_GRPC_PORT = 5001 @@ -51,6 +54,9 @@ var ( envExecutorImageRelated = os.Getenv(ENV_EXECUTOR_IMAGE_RELATED) envEngineImage = os.Getenv(ENV_ENGINE_IMAGE) envEngineImageRelated = os.Getenv(ENV_ENGINE_IMAGE_RELATED) + envEngineUser = os.Getenv(ENV_ENGINE_USER) + envExecutorUser = os.Getenv(ENV_EXECUTOR_USER) + envUseExecutor = os.Getenv(ENV_USE_EXECUTOR) ) func addEngineToDeployment(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, engine_http_port int, engine_grpc_port int, pSvcName string, deploy *appsv1.Deployment) error { @@ -140,8 +146,7 @@ func getExecutorGrpcPort() (engine_grpc_port int, err error) { func isExecutorEnabled(mlDep *machinelearningv1.SeldonDeployment) bool { useExecutor := getAnnotation(mlDep, machinelearningv1.ANNOTATION_EXECUTOR, "false") - useExecutorEnv := GetEnv("USE_EXECUTOR", "false") - return useExecutor == "true" || useExecutorEnv == "true" + return useExecutor == "true" || envUseExecutor == "true" } func getPrometheusPath(mlDep *machinelearningv1.SeldonDeployment) string { @@ -168,31 +173,6 @@ func getSvcOrchSvcAccountName(mlDep *machinelearningv1.SeldonDeployment) string return svcAccount } -func getSvcOrchUser(mlDep *machinelearningv1.SeldonDeployment) (int64, error) { - var engineUser int64 = -1 - if isExecutorEnabled(mlDep) { - if engineUserEnv, ok := os.LookupEnv("EXECUTOR_CONTAINER_USER"); ok { - user, err := strconv.Atoi(engineUserEnv) - if err != nil { - return -1, err - } else { - engineUser = int64(user) - } - } - - } else { - if engineUserEnv, ok := os.LookupEnv("ENGINE_CONTAINER_USER"); ok { - user, err := strconv.Atoi(engineUserEnv) - if err != nil { - return -1, err - } else { - engineUser = int64(user) - } - } - } - return engineUser, nil -} - func createExecutorContainer(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, predictorB64 string, http_port int, grpc_port int, resources *corev1.ResourceRequirements) (*corev1.Container, error) { transport := mlDep.Spec.Transport //Backwards compatible with older resources @@ -324,11 +304,6 @@ func createEngineContainerSpec(mlDep *machinelearningv1.SeldonDeployment, p *mac // Create the Container for the service orchestrator. func createEngineContainer(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, engine_http_port, engine_grpc_port int) (*corev1.Container, error) { - // Get engine user - engineUser, err := getSvcOrchUser(mlDep) - if err != nil { - return nil, err - } // get predictor as base64 encoded json pCopy := p.DeepCopy() // Set traffic to zero to ensure this doesn't cause a diff in the resulting deployment created @@ -370,10 +345,6 @@ func createEngineContainer(mlDep *machinelearningv1.SeldonDeployment, p *machine } } - if engineUser != -1 { - c.SecurityContext = &corev1.SecurityContext{RunAsUser: &engineUser} - } - // Environment vars if specified svcOrchEnvMap := make(map[string]string) if p.SvcOrchSpec.Env != nil { diff --git a/operator/controllers/seldondeployment_engine_test.go b/operator/controllers/seldondeployment_engine_test.go index 14262a06df..5bf20b9b58 100644 --- a/operator/controllers/seldondeployment_engine_test.go +++ b/operator/controllers/seldondeployment_engine_test.go @@ -50,17 +50,28 @@ func createTestSeldonDeployment() *machinelearningv1.SeldonDeployment { } } +func cleanEnvImages() { + envUseExecutor = "" + envExecutorImage = "" + envExecutorImageRelated = "" + envEngineImage = "" + envEngineImageRelated = "" +} + func TestExecutorCreateNoEnv(t *testing.T) { g := NewGomegaWithT(t) + cleanEnvImages() envExecutorImage = "" envExecutorImageRelated = "" mlDep := createTestSeldonDeployment() _, err := createExecutorContainer(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) g.Expect(err).ToNot(BeNil()) + cleanEnvImages() } func TestExecutorCreateEnv(t *testing.T) { g := NewGomegaWithT(t) + cleanEnvImages() imageName := "myimage" envExecutorImage = imageName envExecutorImageRelated = "" @@ -68,10 +79,12 @@ func TestExecutorCreateEnv(t *testing.T) { con, err := createExecutorContainer(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) g.Expect(err).To(BeNil()) g.Expect(con.Image).To(Equal(imageName)) + cleanEnvImages() } func TestExecutorCreateEnvRelated(t *testing.T) { g := NewGomegaWithT(t) + cleanEnvImages() imageName := "myimage" imageNameRelated := "myimage2" envExecutorImage = imageName @@ -80,19 +93,23 @@ func TestExecutorCreateEnvRelated(t *testing.T) { con, err := createExecutorContainer(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) g.Expect(err).To(BeNil()) g.Expect(con.Image).To(Equal(imageNameRelated)) + cleanEnvImages() } func TestEngineCreateNoEnv(t *testing.T) { g := NewGomegaWithT(t) + cleanEnvImages() envEngineImage = "" envEngineImageRelated = "" mlDep := createTestSeldonDeployment() _, err := createEngineContainerSpec(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) g.Expect(err).ToNot(BeNil()) + cleanEnvImages() } func TestEngineCreateEnv(t *testing.T) { g := NewGomegaWithT(t) + cleanEnvImages() imageName := "myimage" envEngineImage = imageName envEngineImageRelated = "" @@ -100,10 +117,12 @@ func TestEngineCreateEnv(t *testing.T) { con, err := createEngineContainerSpec(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) g.Expect(err).To(BeNil()) g.Expect(con.Image).To(Equal(imageName)) + cleanEnvImages() } func TestEngineCreateEnvRelated(t *testing.T) { g := NewGomegaWithT(t) + cleanEnvImages() imageName := "myimage" imageNameRelated := "myimage2" envEngineImage = imageName @@ -112,4 +131,5 @@ func TestEngineCreateEnvRelated(t *testing.T) { con, err := createEngineContainerSpec(mlDep, &mlDep.Spec.Predictors[0], "", 1, 2, &v1.ResourceRequirements{}) g.Expect(err).To(BeNil()) g.Expect(con.Image).To(Equal(imageNameRelated)) + cleanEnvImages() } diff --git a/operator/controllers/seldondeployment_explainers.go b/operator/controllers/seldondeployment_explainers.go index 001329b65f..d76957f405 100644 --- a/operator/controllers/seldondeployment_explainers.go +++ b/operator/controllers/seldondeployment_explainers.go @@ -32,7 +32,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" ) -func createExplainer(r *SeldonDeploymentReconciler, mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, c *components, pSvcName string, log logr.Logger) error { +func createExplainer(r *SeldonDeploymentReconciler, mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, c *components, pSvcName string, podSecurityContect *corev1.PodSecurityContext, log logr.Logger) error { if !isEmptyExplainer(p.Explainer) { @@ -148,7 +148,7 @@ func createExplainer(r *SeldonDeploymentReconciler, mlDep *machinelearningv1.Sel Containers: []corev1.Container{explainerContainer}, }} - deploy := createDeploymentWithoutEngine(depName, seldonId, &seldonPodSpec, p, mlDep) + deploy := createDeploymentWithoutEngine(depName, seldonId, &seldonPodSpec, p, mlDep, podSecurityContect) if p.Explainer.ModelUri != "" { var err error diff --git a/operator/controllers/seldondeployment_explainers_test.go b/operator/controllers/seldondeployment_explainers_test.go index 5db7a8433a..f7b6159e14 100644 --- a/operator/controllers/seldondeployment_explainers_test.go +++ b/operator/controllers/seldondeployment_explainers_test.go @@ -17,14 +17,19 @@ limitations under the License. package controllers import ( + "context" . "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/gomega" - machinelearningv1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1" "github.com/seldonio/seldon-core/operator/constants" + appsv1 "k8s.io/api/apps/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/rand" ctrl "sigs.k8s.io/controller-runtime" + "time" ) var _ = Describe("createExplainer", func() { @@ -64,7 +69,7 @@ var _ = Describe("createExplainer", func() { "Empty explainers should not create any component", func(explainer *machinelearningv1.Explainer) { p.Explainer = explainer - err := createExplainer(r, mlDep, p, c, pSvcName, r.Log) + err := createExplainer(r, mlDep, p, c, pSvcName, nil, r.Log) Expect(err).ToNot(HaveOccurred()) Expect(c.deployments).To(BeEmpty()) @@ -73,3 +78,132 @@ var _ = Describe("createExplainer", func() { Entry("empty type", &machinelearningv1.Explainer{}), ) }) + +var _ = Describe("Create a Seldon Deployment with explainer", func() { + const timeout = time.Second * 30 + const interval = time.Second * 1 + namespaceName := rand.String(10) + By("Creating a resource") + It("should create a resource with defaults", func() { + Expect(k8sClient).NotTo(BeNil()) + var modelType = machinelearningv1.MODEL + key := types.NamespacedName{ + Name: "dep", + Namespace: namespaceName, + } + instance := &machinelearningv1.SeldonDeployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: key.Name, + Namespace: key.Namespace, + }, + Spec: machinelearningv1.SeldonDeploymentSpec{ + Name: "mydep", + Predictors: []machinelearningv1.PredictorSpec{ + { + Name: "p1", + ComponentSpecs: []*machinelearningv1.SeldonPodSpec{ + { + Spec: v1.PodSpec{ + Containers: []v1.Container{ + { + Image: "seldonio/mock_classifier:1.0", + Name: "classifier", + }, + }, + }, + }, + }, + Graph: &machinelearningv1.PredictiveUnit{ + Name: "classifier", + Type: &modelType, + }, + Explainer: &machinelearningv1.Explainer{ + Type: machinelearningv1.AlibiAnchorsTabularExplainer, + }, + }, + }, + }, + } + + //Create namespace + namespace := &v1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: namespaceName, + }, + } + Expect(k8sClient.Create(context.Background(), namespace)).Should(Succeed()) + + // Run Defaulter + instance.Default() + envUseExecutor = "true" + envExecutorUser = "2" + Expect(k8sClient.Create(context.Background(), instance)).Should(Succeed()) + //time.Sleep(time.Second * 5) + + fetched := &machinelearningv1.SeldonDeployment{} + Eventually(func() error { + err := k8sClient.Get(context.Background(), key, fetched) + return err + }, timeout, interval).Should(BeNil()) + Expect(fetched.Name).Should(Equal("dep")) + + // Check deployment created + depKey := types.NamespacedName{ + Name: machinelearningv1.GetDeploymentName(instance, instance.Spec.Predictors[0], instance.Spec.Predictors[0].ComponentSpecs[0], 0), + Namespace: namespaceName, + } + depFetched := &appsv1.Deployment{} + Eventually(func() error { + err := k8sClient.Get(context.Background(), depKey, depFetched) + return err + }, timeout, interval).Should(BeNil()) + Expect(len(depFetched.Spec.Template.Spec.Containers)).Should(Equal(2)) + Expect(*depFetched.Spec.Replicas).To(Equal(int32(1))) + Expect(*depFetched.Spec.Template.Spec.SecurityContext.RunAsUser).To(Equal(int64(2))) + + //Check explainer deployment + depKey = types.NamespacedName{ + Name: machinelearningv1.GetExplainerDeploymentName(instance.Name, &instance.Spec.Predictors[0]), + Namespace: namespaceName, + } + depFetched = &appsv1.Deployment{} + Eventually(func() error { + err := k8sClient.Get(context.Background(), depKey, depFetched) + return err + }, timeout, interval).Should(BeNil()) + Expect(len(depFetched.Spec.Template.Spec.Containers)).Should(Equal(1)) + Expect(*depFetched.Spec.Replicas).To(Equal(int32(1))) + Expect(*depFetched.Spec.Template.Spec.SecurityContext.RunAsUser).To(Equal(int64(2))) + + //Check svc created + svcKey := types.NamespacedName{ + Name: machinelearningv1.GetContainerServiceName("dep", instance.Spec.Predictors[0], &instance.Spec.Predictors[0].ComponentSpecs[0].Spec.Containers[0]), + Namespace: namespaceName, + } + svcFetched := &v1.Service{} + Eventually(func() error { + err := k8sClient.Get(context.Background(), svcKey, svcFetched) + return err + }, timeout, interval).Should(BeNil()) + + // Check events created + serviceCreatedEvents := 0 + deploymentsCreatedEvents := 0 + evts, err := clientset.CoreV1().Events(namespaceName).Search(scheme, fetched) + Expect(err).To(BeNil()) + for _, evt := range evts.Items { + if evt.Reason == constants.EventsCreateService { + serviceCreatedEvents = serviceCreatedEvents + 1 + } else if evt.Reason == constants.EventsCreateDeployment { + deploymentsCreatedEvents = deploymentsCreatedEvents + 1 + } + } + + Expect(serviceCreatedEvents).To(Equal(3)) + Expect(deploymentsCreatedEvents).To(Equal(2)) + + Expect(k8sClient.Delete(context.Background(), instance)).Should(Succeed()) + + }) + +}) diff --git a/operator/controllers/seldondeployment_prepackaged_servers.go b/operator/controllers/seldondeployment_prepackaged_servers.go index 13e8066705..f3bddd9314 100644 --- a/operator/controllers/seldondeployment_prepackaged_servers.go +++ b/operator/controllers/seldondeployment_prepackaged_servers.go @@ -257,7 +257,7 @@ func SetUriParamsForTFServingProxyContainer(pu *machinelearningv1.PredictiveUnit } } -func createStandaloneModelServers(r *SeldonDeploymentReconciler, mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, c *components, pu *machinelearningv1.PredictiveUnit) error { +func createStandaloneModelServers(r *SeldonDeploymentReconciler, mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, c *components, pu *machinelearningv1.PredictiveUnit, podSecurityContext *v1.PodSecurityContext) error { if machinelearningv1.IsPrepack(pu) { sPodSpec, idx := utils.GetSeldonPodSpecForPredictiveUnit(p, pu.Name) @@ -281,7 +281,7 @@ func createStandaloneModelServers(r *SeldonDeploymentReconciler, mlDep *machinel // might not be a Deployment yet - if so we have to create one if deploy == nil { seldonId := machinelearningv1.GetSeldonDeploymentName(mlDep) - deploy = createDeploymentWithoutEngine(depName, seldonId, sPodSpec, p, mlDep) + deploy = createDeploymentWithoutEngine(depName, seldonId, sPodSpec, p, mlDep, podSecurityContext) } ServerConfig := machinelearningv1.GetPrepackServerConfig(string(*pu.Implementation)) @@ -313,7 +313,7 @@ func createStandaloneModelServers(r *SeldonDeploymentReconciler, mlDep *machinel } for i := 0; i < len(pu.Children); i++ { - if err := createStandaloneModelServers(r, mlDep, p, c, &pu.Children[i]); err != nil { + if err := createStandaloneModelServers(r, mlDep, p, c, &pu.Children[i], podSecurityContext); err != nil { return err } } diff --git a/operator/controllers/seldondeployment_prepackaged_servers_test.go b/operator/controllers/seldondeployment_prepackaged_servers_test.go index 5e7ecdfbd8..a66939ae11 100644 --- a/operator/controllers/seldondeployment_prepackaged_servers_test.go +++ b/operator/controllers/seldondeployment_prepackaged_servers_test.go @@ -2,10 +2,6 @@ package controllers import ( "context" - "strconv" - "strings" - "time" - . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" machinelearningv1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1" @@ -15,6 +11,9 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" + "strconv" + "strings" + "time" ) var _ = Describe("Create a prepacked sklearn server", func() { @@ -22,6 +21,7 @@ var _ = Describe("Create a prepacked sklearn server", func() { const interval = time.Second * 1 const name = "pp1" const sdepName = "prepack1" + envExecutorUser = "2" By("Creating a resource") It("should create a resource with defaults", func() { Expect(k8sClient).NotTo(BeNil()) @@ -87,6 +87,9 @@ var _ = Describe("Create a prepacked sklearn server", func() { Expect(len(depFetched.Spec.Template.Spec.Containers)).Should(Equal(2)) Expect(k8sClient.Delete(context.Background(), instance)).Should(Succeed()) + + //j, _ := json.Marshal(depFetched) + //fmt.Println(string(j)) }) }) @@ -391,3 +394,87 @@ var _ = Describe("Create a prepacked tfserving server for tensorflow protocol an }) }) + +var _ = Describe("Create a prepacked sklearn server", func() { + const timeout = time.Second * 30 + const interval = time.Second * 1 + const name = "pp1" + const sdepName = "prepack1" + envExecutorUser = "2" + By("Creating a resource") + It("should create a resource with defaults and security context", func() { + Expect(k8sClient).NotTo(BeNil()) + var modelType = machinelearningv1.MODEL + var impl = machinelearningv1.PredictiveUnitImplementation(constants.PrePackedServerSklearn) + key := types.NamespacedName{ + Name: sdepName, + Namespace: "default", + } + instance := &machinelearningv1.SeldonDeployment{ + ObjectMeta: metav1.ObjectMeta{ + Name: key.Name, + Namespace: key.Namespace, + }, + Spec: machinelearningv1.SeldonDeploymentSpec{ + Name: name, + Predictors: []machinelearningv1.PredictorSpec{ + { + Name: "p1", + Graph: &machinelearningv1.PredictiveUnit{ + Name: "classifier", + Type: &modelType, + Implementation: &impl, + Endpoint: &machinelearningv1.Endpoint{Type: machinelearningv1.REST}, + }, + }, + }, + }, + } + + configMapName := types.NamespacedName{Name: "seldon-config", + Namespace: "seldon-system"} + + configResult := &corev1.ConfigMap{} + const timeout = time.Second * 30 + Eventually(func() error { return k8sClient.Get(context.TODO(), configMapName, configResult) }, timeout). + Should(Succeed()) + + // Run Defaulter + instance.Default() + + //set security user + envUseExecutor = "true" + envExecutorUser = "2" + + Expect(k8sClient.Create(context.Background(), instance)).Should(Succeed()) + //time.Sleep(time.Second * 5) + + fetched := &machinelearningv1.SeldonDeployment{} + Eventually(func() error { + err := k8sClient.Get(context.Background(), key, fetched) + return err + }, timeout, interval).Should(BeNil()) + Expect(fetched.Name).Should(Equal(sdepName)) + + sPodSpec, idx := utils.GetSeldonPodSpecForPredictiveUnit(&instance.Spec.Predictors[0], instance.Spec.Predictors[0].Graph.Name) + depName := machinelearningv1.GetDeploymentName(instance, instance.Spec.Predictors[0], sPodSpec, idx) + depKey := types.NamespacedName{ + Name: depName, + Namespace: "default", + } + depFetched := &appsv1.Deployment{} + Eventually(func() error { + err := k8sClient.Get(context.Background(), depKey, depFetched) + return err + }, timeout, interval).Should(BeNil()) + Expect(len(depFetched.Spec.Template.Spec.Containers)).Should(Equal(2)) + Expect(depFetched.Spec.Template.Spec.SecurityContext).ToNot(BeNil()) + Expect(*depFetched.Spec.Template.Spec.SecurityContext.RunAsUser).To(Equal(int64(2))) + + Expect(k8sClient.Delete(context.Background(), instance)).Should(Succeed()) + + //j, _ := json.Marshal(depFetched) + //fmt.Println(string(j)) + }) + +}) diff --git a/operator/controllers/suite_test.go b/operator/controllers/suite_test.go index abdcc632f3..f174428978 100644 --- a/operator/controllers/suite_test.go +++ b/operator/controllers/suite_test.go @@ -119,6 +119,14 @@ var configMap = &corev1.ConfigMap{ Data: configs, } +var _ = JustBeforeEach(func() { + envUseExecutor = "true" + envExecutorImage = "a" + envExecutorImageRelated = "b" + envEngineImage = "c" + envEngineImageRelated = "d" +}) + var _ = BeforeSuite(func(done Done) { logf.SetLogger(zap.LoggerTo(GinkgoWriter, true)) diff --git a/operator/go.mod b/operator/go.mod index 142f20a6af..d0c8824bf0 100644 --- a/operator/go.mod +++ b/operator/go.mod @@ -10,8 +10,9 @@ require ( github.com/gogo/protobuf v1.3.1 github.com/google/go-cmp v0.3.1 github.com/gophercloud/gophercloud v0.4.0 // indirect - github.com/onsi/ginkgo v1.11.0 + github.com/onsi/ginkgo v1.12.0 github.com/onsi/gomega v1.8.1 + golang.org/x/sys v0.0.0-20200409092240-59c9f1ba88fa // indirect gopkg.in/yaml.v2 v2.2.4 istio.io/api v0.0.0-20200305220354-742c3015842e istio.io/client-go v0.0.0-20200305195406-fddfc7a9ca06 diff --git a/operator/go.sum b/operator/go.sum index 6251fa4b01..80166b0e0c 100644 --- a/operator/go.sum +++ b/operator/go.sum @@ -243,9 +243,12 @@ github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= +github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.8.1 h1:C5Dqfs/LeauYDX0jJXIe2SWmwCbGzx9yF8C8xy3Lh34= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= @@ -383,6 +386,9 @@ golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe h1:6fAMxZRR6sl1Uq8U61gxU+kPTs2tR8uOySCbBP7BN/M= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200409092240-59c9f1ba88fa h1:mQTN3ECqfsViCNBgq+A40vdwhkGykrrQlYe3mPj6BoU= +golang.org/x/sys v0.0.0-20200409092240-59c9f1ba88fa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/operator/seldon-operator/README.md b/operator/seldon-operator/README.md index 8aed8ec1b6..a5d3b3c5b2 100644 --- a/operator/seldon-operator/README.md +++ b/operator/seldon-operator/README.md @@ -171,6 +171,7 @@ Follow quay bundle upload above. See [testing/openshift/README.md](testing/openshift/README.md). +[Create an Openshift cluster on AWS](https://cloud.redhat.com/openshift/install/aws/installer-provisioned) ## Release Process onto RedHat channels diff --git a/operator/seldon-operator/deploy/cluster_role.yaml b/operator/seldon-operator/deploy/cluster_role.yaml index f32dd4cc17..93ad174251 100644 --- a/operator/seldon-operator/deploy/cluster_role.yaml +++ b/operator/seldon-operator/deploy/cluster_role.yaml @@ -66,6 +66,13 @@ rules: - get - patch - update +- apiGroups: + - '' + resources: + - events + verbs: + - create + - patch - apiGroups: - '' resources: diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/seldon-operator.v1.0.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/seldon-operator.v1.0.0.clusterserviceversion.yaml index 5fc7543547..5ba1f97fcc 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/seldon-operator.v1.0.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.0.0/seldon-operator.v1.0.0.clusterserviceversion.yaml @@ -110,6 +110,12 @@ spec: - description: State of the deployments created from the SeldonDeployment displayName: deploymentStatus path: deploymentStatus + - description: The number of default replicas for predictors who do not override the value + displayName: replicas + path: replicas + - description: The URL of the main default predictor service + displayName: address + path: address version: v1 description: "The Seldon operator enables for native operation of production machine learning workloads, including monitoring and operations of language-agnostic models diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index a2ed881cb8..32afda4037 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -110,6 +110,13 @@ spec: - description: State of the deployments created from the SeldonDeployment displayName: deploymentStatus path: deploymentStatus + - description: The number of default replicas for predictors who do not override + the value + displayName: replicas + path: replicas + - description: The URL of the main default predictor service + displayName: address + path: address version: v1 description: "The Seldon operator enables for native operation of production machine learning workloads, including monitoring and operations of language-agnostic models @@ -185,6 +192,13 @@ spec: - get - patch - update + - apiGroups: + - "" + resources: + - events + verbs: + - create + - patch - apiGroups: - "" resources: @@ -368,7 +382,7 @@ spec: containers: - args: - --enable-leader-election - - --webhook-port=443 + - --webhook-port=8443 - --create-resources=$(CREATE_RESOURCES) command: - /manager @@ -397,7 +411,6 @@ spec: - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME value: default - name: ENGINE_CONTAINER_USER - value: "8888" - name: ENGINE_LOG_MESSAGES_EXTERNALLY value: "false" - name: PREDICTIVE_UNIT_SERVICE_PORT @@ -412,7 +425,7 @@ spec: - name: ISTIO_ENABLED value: "false" - name: ISTIO_GATEWAY - value: seldon-gateway + value: istio-system/seldon-gateway - name: ISTIO_TLS_MODE - name: USE_EXECUTOR value: "true" @@ -427,15 +440,15 @@ spec: - name: EXECUTOR_SERVER_PORT value: "8000" - name: EXECUTOR_CONTAINER_USER - value: "8888" - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX value: http://default-broker. image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT + imagePullPolicy: Always name: manager ports: - - containerPort: 443 + - containerPort: 8443 name: webhook-server protocol: TCP resources: diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml index eddabfd38d..c2caa3730f 100644 --- a/operator/seldon-operator/deploy/operator.yaml +++ b/operator/seldon-operator/deploy/operator.yaml @@ -32,7 +32,7 @@ spec: containers: - args: - --enable-leader-election - - --webhook-port=443 + - --webhook-port=8443 - --create-resources=$(CREATE_RESOURCES) command: - /manager @@ -62,7 +62,7 @@ spec: - name: ENGINE_CONTAINER_SERVICE_ACCOUNT_NAME value: default - name: ENGINE_CONTAINER_USER - value: '8888' + value: '' - name: ENGINE_LOG_MESSAGES_EXTERNALLY value: 'false' - name: PREDICTIVE_UNIT_SERVICE_PORT @@ -78,7 +78,7 @@ spec: - name: ISTIO_ENABLED value: 'false' - name: ISTIO_GATEWAY - value: seldon-gateway + value: istio-system/seldon-gateway - name: ISTIO_TLS_MODE value: '' - name: USE_EXECUTOR @@ -94,7 +94,7 @@ spec: - name: EXECUTOR_SERVER_PORT value: '8000' - name: EXECUTOR_CONTAINER_USER - value: '8888' + value: '' - name: EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME value: default - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX @@ -102,7 +102,7 @@ spec: image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT name: manager ports: - - containerPort: 443 + - containerPort: 8443 name: webhook-server protocol: TCP resources: diff --git a/operator/seldon-operator/deploy/role.yaml b/operator/seldon-operator/deploy/role.yaml index 6684484ef4..14a899f914 100644 --- a/operator/seldon-operator/deploy/role.yaml +++ b/operator/seldon-operator/deploy/role.yaml @@ -66,6 +66,13 @@ rules: - get - patch - update +- apiGroups: + - '' + resources: + - events + verbs: + - create + - patch - apiGroups: - '' resources: diff --git a/operator/seldon-operator/hack/create_resources.py b/operator/seldon-operator/hack/create_resources.py index d07bdad1f4..e5fe86cbe0 100644 --- a/operator/seldon-operator/hack/create_resources.py +++ b/operator/seldon-operator/hack/create_resources.py @@ -16,6 +16,8 @@ OPERATOR_FILE="operator.yaml" SERVICEACCOUNT_FILE="service_account.yaml" +WEBHOOK_PORT=8443 + if __name__ == "__main__": exp = args.input + "/*" files = glob.glob(exp) @@ -37,6 +39,30 @@ if kind == "deployment" and name == "seldon-controller-manager": serviceAccountName = res["spec"]["template"]["spec"]["serviceAccountName"] res["metadata"]["namespace"] = "default" + + for portSpec in res["spec"]["template"]["spec"]["containers"][0][ + "ports" + ]: + if portSpec["name"] == "webhook-server": + portSpec["containerPort"] = WEBHOOK_PORT + for argIdx in range( + 0, len(res["spec"]["template"]["spec"]["containers"][0]["args"]) + ): + if ( + res["spec"]["template"]["spec"]["containers"][0]["args"][argIdx] + == "--webhook-port=443" + ): + res["spec"]["template"]["spec"]["containers"][0]["args"][ + argIdx + ] = "--webhook-port=" + str(WEBHOOK_PORT) + + # Ensure functionality to generate uids respecting openshift is active + for env in res["spec"]["template"]["spec"]["containers"][0]["env"]: + if env["name"] == "EXECUTOR_CONTAINER_USER": + env["value"] = "" + if env["name"] == "ENGINE_CONTAINER_USER": + env["value"] = "" + print("Writing ",OPERATOR_FILE) filename = args.output + "/" + OPERATOR_FILE fdata = yaml.dump(res, width=1000) diff --git a/operator/seldon-operator/testing/openshift/operator-group.yaml b/operator/seldon-operator/testing/openshift/operator-group.yaml new file mode 100644 index 0000000000..a4d2ac7220 --- /dev/null +++ b/operator/seldon-operator/testing/openshift/operator-group.yaml @@ -0,0 +1,8 @@ +apiVersion: operators.coreos.com/v1alpha2 +kind: OperatorGroup +metadata: + name: seldon-operatorgroup + namespace: istio-test +spec: + targetNamespaces: + - istio-test diff --git a/operator/seldon-operator/testing/openshift/operator-subscription-istio.yaml b/operator/seldon-operator/testing/openshift/operator-subscription-istio.yaml new file mode 100644 index 0000000000..ac2546aa20 --- /dev/null +++ b/operator/seldon-operator/testing/openshift/operator-subscription-istio.yaml @@ -0,0 +1,14 @@ +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: seldon-operator-subsription + namespace: istio-test +spec: + channel: alpha + name: seldon-operator + source: seldon-operators + sourceNamespace: openshift-marketplace + config: + env: + - name: ISTIO_ENABLED + value: "true" diff --git a/release b/release index 721b05f88c..ac9484e148 100755 --- a/release +++ b/release @@ -13,5 +13,5 @@ docker run --rm -it \ -e MAVEN_REPOSITORY_LOCATION=${MAVEN_REPOSITORY_LOCATION} \ -v ${HOME}/.m2/repository:${MAVEN_REPOSITORY_LOCATION} \ -v "${STARTUP_DIR}":/work \ - seldonio/core-builder:0.13 python release.py "$@" + seldonio/core-builder:0.14 python release.py "$@" diff --git a/testing/resources/seldon-gateway.yaml b/testing/resources/seldon-gateway.yaml index faf047a7e4..4b8e194437 100644 --- a/testing/resources/seldon-gateway.yaml +++ b/testing/resources/seldon-gateway.yaml @@ -2,6 +2,7 @@ apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: seldon-gateway + namespace: istio-system spec: selector: istio: ingressgateway # use istio default controller diff --git a/testing/scripts/Makefile b/testing/scripts/Makefile index cff4e736a2..1037b0c1c5 100644 --- a/testing/scripts/Makefile +++ b/testing/scripts/Makefile @@ -58,7 +58,7 @@ install_seldon: install_cert_manager ../../helm-charts/seldon-core-operator \ --namespace seldon-system \ --set istio.enabled=true \ - --set istio.gateway=seldon-gateway \ + --set istio.gateway=istio-system/seldon-gateway \ --set certManager.enabled=false \ --set executor.enabled=true \ --wait diff --git a/testing/scripts/conftest.py b/testing/scripts/conftest.py index ecef91b801..333e6477fd 100644 --- a/testing/scripts/conftest.py +++ b/testing/scripts/conftest.py @@ -68,7 +68,7 @@ def test_old_versions(seldon_version): "seldonio/seldon-core-operator " "--namespace seldon-system " "--set istio.enabled=true " - "--set istio.gateway=seldon-gateway " + "--set istio.gateway=istio-system/seldon-gateway " "--set certManager.enabled=false " "--set executor.enabled=true " f"--version {seldon_version} " @@ -84,7 +84,7 @@ def test_old_versions(seldon_version): "../../helm-charts/seldon-core-operator " "--namespace seldon-system " "--set istio.enabled=true " - "--set istio.gateway=seldon-gateway " + "--set istio.gateway=istio-system/seldon-gateway " "--set certManager.enabled=false " "--set executor.enabled=true " "--wait", diff --git a/testing/scripts/test_local_operators.py b/testing/scripts/test_local_operators.py index def590e053..d627dd09e0 100644 --- a/testing/scripts/test_local_operators.py +++ b/testing/scripts/test_local_operators.py @@ -13,7 +13,7 @@ class TestLocalOperators(object): def test_namespace_operator(self, namespace): retry_run( - f"helm install seldon ../../helm-charts/seldon-core-operator --namespace {namespace} --set executor.enabled=true --set istio.enabled=true --set istio.gateway=seldon-gateway --set certManager.enabled=false --set crd.create=false --set singleNamespace=true" + f"helm install seldon ../../helm-charts/seldon-core-operator --namespace {namespace} --set executor.enabled=true --set istio.enabled=true --set istio.gateway=istio-system/seldon-gateway --set certManager.enabled=false --set crd.create=false --set singleNamespace=true" ) retry_run(f"kubectl apply -f ../resources/graph1.json -n {namespace}") wait_for_status("mymodel", namespace) @@ -28,7 +28,7 @@ def test_namespace_operator(self, namespace): def test_labelled_operator(self, namespace): retry_run( - f"helm install seldon ../../helm-charts/seldon-core-operator --namespace {namespace} --set executor.enabled=true --set istio.enabled=true --set istio.gateway=seldon-gateway --set certManager.enabled=false --set crd.create=false --set controllerId=seldon-id1" + f"helm install seldon ../../helm-charts/seldon-core-operator --namespace {namespace} --set executor.enabled=true --set istio.enabled=true --set istio.gateway=istio-system/seldon-gateway --set certManager.enabled=false --set crd.create=false --set controllerId=seldon-id1" ) retry_run( f"kubectl apply -f ../resources/model_controller_id.yaml -n {namespace}" diff --git a/testing/scripts/test_rolling_updates.py b/testing/scripts/test_rolling_updates.py index 8a29855f61..eb3bc0ae97 100644 --- a/testing/scripts/test_rolling_updates.py +++ b/testing/scripts/test_rolling_updates.py @@ -35,7 +35,7 @@ class TestRollingHttp(object): def test_rolling_update5(self, namespace, api_gateway): if api_gateway == API_ISTIO_GATEWAY: retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n {namespace}" + f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" ) retry_run(f"kubectl apply -f ../resources/graph1.json -n {namespace}") wait_for_status("mymodel", namespace) @@ -70,7 +70,7 @@ def test_rolling_update5(self, namespace, api_gateway): def test_rolling_update6(self, namespace, api_gateway): if api_gateway == API_ISTIO_GATEWAY: retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n {namespace}" + f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) @@ -105,7 +105,7 @@ def test_rolling_update6(self, namespace, api_gateway): def test_rolling_update7(self, namespace, api_gateway): if api_gateway == API_ISTIO_GATEWAY: retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n {namespace}" + f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) @@ -140,7 +140,7 @@ def test_rolling_update7(self, namespace, api_gateway): def test_rolling_update8(self, namespace, api_gateway): if api_gateway == API_ISTIO_GATEWAY: retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n {namespace}" + f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) @@ -168,7 +168,7 @@ def test_rolling_update8(self, namespace, api_gateway): def test_rolling_update9(self, namespace, api_gateway): if api_gateway == API_ISTIO_GATEWAY: retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n {namespace}" + f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) @@ -196,7 +196,7 @@ def test_rolling_update9(self, namespace, api_gateway): def test_rolling_update10(self, namespace, api_gateway): if api_gateway == API_ISTIO_GATEWAY: retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n {namespace}" + f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) @@ -248,7 +248,7 @@ def test_rolling_deployment( namespace, api_gateway, from_deployment, to_deployment, change ): if api_gateway == API_ISTIO_GATEWAY: - retry_run(f"kubectl create -f ../resources/seldon-gateway.yaml -n {namespace}") + retry_run(f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system") from_file_path = to_resources_path(from_deployment) retry_run(f"kubectl apply -f {from_file_path} -n {namespace}") From 3b6b2e656c78b278b8e64d9d6225e89def2f262e Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Fri, 10 Apr 2020 20:44:52 +0100 Subject: [PATCH 21/34] lint --- operator/helm/split_resources.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/operator/helm/split_resources.py b/operator/helm/split_resources.py index 820d0c303b..4f4bb6794d 100644 --- a/operator/helm/split_resources.py +++ b/operator/helm/split_resources.py @@ -120,14 +120,18 @@ def helm_release(value: str): ] = "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" # Resource requests - res["spec"]["template"]["spec"]["containers"][0]["resources"]["requests"][ - "cpu"] = helm_value("manager.cpuRequest") - res["spec"]["template"]["spec"]["containers"][0]["resources"]["requests"][ - "memory"] = helm_value("manager.memoryRequest") + res["spec"]["template"]["spec"]["containers"][0]["resources"][ + "requests" + ]["cpu"] = helm_value("manager.cpuRequest") + res["spec"]["template"]["spec"]["containers"][0]["resources"][ + "requests" + ]["memory"] = helm_value("manager.memoryRequest") res["spec"]["template"]["spec"]["containers"][0]["resources"]["limits"][ - "cpu"] = helm_value("manager.cpuLimit") + "cpu" + ] = helm_value("manager.cpuLimit") res["spec"]["template"]["spec"]["containers"][0]["resources"]["limits"][ - "memory"] = helm_value("manager.memoryLimit") + "memory" + ] = helm_value("manager.memoryLimit") for env in res["spec"]["template"]["spec"]["containers"][0]["env"]: if env["name"] in HELM_ENV_SUBST: From ff1a3bd3c97d1f20832a0d806c7c27216f0e712d Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sat, 11 Apr 2020 09:29:35 +0100 Subject: [PATCH 22/34] Fix istio tests - only need to install gateway once in istio-system --- testing/scripts/Makefile | 1 + testing/scripts/test_rolling_updates.py | 27 ------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/testing/scripts/Makefile b/testing/scripts/Makefile index 1037b0c1c5..b8fdbac1d6 100644 --- a/testing/scripts/Makefile +++ b/testing/scripts/Makefile @@ -68,6 +68,7 @@ install_istio: kubectl rollout status deployment.apps/istio-ingressgateway -n istio-system kubectl rollout status deployment.apps/istio-pilot -n istio-system kubectl rollout status deployment.apps/istio-citadel -n istio-system + kubectl create -f ../resources/seldon-gateway.yaml -n istio-system create_namespaces: diff --git a/testing/scripts/test_rolling_updates.py b/testing/scripts/test_rolling_updates.py index eb3bc0ae97..976de2e5f4 100644 --- a/testing/scripts/test_rolling_updates.py +++ b/testing/scripts/test_rolling_updates.py @@ -33,10 +33,6 @@ def to_resources_path(file_name): class TestRollingHttp(object): # Test updating a model to a multi predictor model def test_rolling_update5(self, namespace, api_gateway): - if api_gateway == API_ISTIO_GATEWAY: - retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" - ) retry_run(f"kubectl apply -f ../resources/graph1.json -n {namespace}") wait_for_status("mymodel", namespace) wait_for_rollout("mymodel", namespace) @@ -68,10 +64,6 @@ def test_rolling_update5(self, namespace, api_gateway): # Test updating a model with a new image version as the only change def test_rolling_update6(self, namespace, api_gateway): - if api_gateway == API_ISTIO_GATEWAY: - retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" - ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) wait_for_rollout("mymodel", namespace, expected_deployments=2) @@ -103,10 +95,6 @@ def test_rolling_update6(self, namespace, api_gateway): # test changing the image version and the name of its container def test_rolling_update7(self, namespace, api_gateway): - if api_gateway == API_ISTIO_GATEWAY: - retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" - ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) wait_for_rollout("mymodel", namespace, expected_deployments=2) @@ -138,10 +126,6 @@ def test_rolling_update7(self, namespace, api_gateway): # Test updating a model with a new resource request but same image def test_rolling_update8(self, namespace, api_gateway): - if api_gateway == API_ISTIO_GATEWAY: - retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" - ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) wait_for_rollout("mymodel", namespace, expected_deployments=2) @@ -166,10 +150,6 @@ def test_rolling_update8(self, namespace, api_gateway): # Test updating a model with a multi deployment new model def test_rolling_update9(self, namespace, api_gateway): - if api_gateway == API_ISTIO_GATEWAY: - retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" - ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) wait_for_rollout("mymodel", namespace, expected_deployments=2) @@ -194,10 +174,6 @@ def test_rolling_update9(self, namespace, api_gateway): # Test updating a model to a multi predictor model def test_rolling_update10(self, namespace, api_gateway): - if api_gateway == API_ISTIO_GATEWAY: - retry_run( - f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system" - ) retry_run(f"kubectl apply -f ../resources/graph1svc.json -n {namespace}") wait_for_status("mymodel", namespace) wait_for_rollout("mymodel", namespace, expected_deployments=2) @@ -247,9 +223,6 @@ def test_rolling_update10(self, namespace, api_gateway): def test_rolling_deployment( namespace, api_gateway, from_deployment, to_deployment, change ): - if api_gateway == API_ISTIO_GATEWAY: - retry_run(f"kubectl create -f ../resources/seldon-gateway.yaml -n istio-system") - from_file_path = to_resources_path(from_deployment) retry_run(f"kubectl apply -f {from_file_path} -n {namespace}") wait_for_status("mymodel", namespace) From f7e27f261c80fba41b6aca3d98340381390022dd Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sat, 11 Apr 2020 16:24:17 +0100 Subject: [PATCH 23/34] Fix mlflow server permission issue when running with non root user --- helm-charts/seldon-core-operator/values.yaml | 4 ++-- operator/config/manager/configmap.yaml | 4 ++-- servers/mlflowserver/Makefile | 4 ++-- wrappers/s2i/python/Dockerfile.gpu.tmpl | 1 + wrappers/s2i/python/Dockerfile.local.tmpl | 2 ++ wrappers/s2i/python/Dockerfile.tmpl | 2 ++ 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/helm-charts/seldon-core-operator/values.yaml b/helm-charts/seldon-core-operator/values.yaml index 22e33b2eb8..f9ad003829 100644 --- a/helm-charts/seldon-core-operator/values.yaml +++ b/helm-charts/seldon-core-operator/values.yaml @@ -89,10 +89,10 @@ predictiveUnit: predictor_servers: MLFLOW_SERVER: grpc: - defaultImageVersion: "0.3" + defaultImageVersion: "0.4" image: seldonio/mlflowserver_grpc rest: - defaultImageVersion: "0.3" + defaultImageVersion: "0.4" image: seldonio/mlflowserver_rest SKLEARN_SERVER: grpc: diff --git a/operator/config/manager/configmap.yaml b/operator/config/manager/configmap.yaml index c256ece99c..86a02e9a00 100644 --- a/operator/config/manager/configmap.yaml +++ b/operator/config/manager/configmap.yaml @@ -52,11 +52,11 @@ data: "MLFLOW_SERVER": { "rest": { "image": "seldonio/mlflowserver_rest", - "defaultImageVersion": "0.2" + "defaultImageVersion": "0.4" }, "grpc": { "image": "seldonio/mlflowserver_grpc", - "defaultImageVersion": "0.2" + "defaultImageVersion": "0.4" } } } diff --git a/servers/mlflowserver/Makefile b/servers/mlflowserver/Makefile index f882c52419..64a37c8e95 100644 --- a/servers/mlflowserver/Makefile +++ b/servers/mlflowserver/Makefile @@ -1,6 +1,6 @@ -VERSION=0.3 +VERSION=0.4 IMAGE_BASE=seldonio/mlflowserver -S2I_IMAGE_VERSION=0.18 +S2I_IMAGE_VERSION=1.1.0-SNAPSHOT build_%: s2i build \ diff --git a/wrappers/s2i/python/Dockerfile.gpu.tmpl b/wrappers/s2i/python/Dockerfile.gpu.tmpl index eed9eba575..72d71b6427 100644 --- a/wrappers/s2i/python/Dockerfile.gpu.tmpl +++ b/wrappers/s2i/python/Dockerfile.gpu.tmpl @@ -18,5 +18,6 @@ COPY requirements_gpu.txt ./requirements.txt COPY _python/python/licenses/license.txt . RUN pip3 install -r requirements.txt +RUN mkdir -p /.conda && chmod a+rwx /.conda EXPOSE 5000 diff --git a/wrappers/s2i/python/Dockerfile.local.tmpl b/wrappers/s2i/python/Dockerfile.local.tmpl index 53fc5dac96..fc31c1934b 100644 --- a/wrappers/s2i/python/Dockerfile.local.tmpl +++ b/wrappers/s2i/python/Dockerfile.local.tmpl @@ -15,4 +15,6 @@ COPY ./s2i/bin/ /s2i/bin COPY _python /microservice RUN cd /microservice/python && make install +RUN mkdir -p /.conda && chmod a+rwx /.conda + EXPOSE 5000 diff --git a/wrappers/s2i/python/Dockerfile.tmpl b/wrappers/s2i/python/Dockerfile.tmpl index cfb480e840..e9fac97775 100644 --- a/wrappers/s2i/python/Dockerfile.tmpl +++ b/wrappers/s2i/python/Dockerfile.tmpl @@ -16,4 +16,6 @@ COPY requirements.txt ./requirements.txt COPY _python/python/licenses/license.txt . RUN pip install -r requirements.txt +RUN mkdir -p /.conda && chmod a+rwx /.conda + EXPOSE 5000 From c70eac84c1a45592e513eace6c4fba5ac9e4d9c0 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sat, 11 Apr 2020 16:25:31 +0100 Subject: [PATCH 24/34] increase flake retries for rolling updates test --- testing/scripts/test_rolling_updates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/scripts/test_rolling_updates.py b/testing/scripts/test_rolling_updates.py index 976de2e5f4..01c8ef7d6a 100644 --- a/testing/scripts/test_rolling_updates.py +++ b/testing/scripts/test_rolling_updates.py @@ -203,7 +203,7 @@ def test_rolling_update10(self, namespace, api_gateway): run(f"kubectl delete -f ../resources/graph6svc.json -n {namespace}", shell=True) -@pytest.mark.flaky(max_runs=2) +@pytest.mark.flaky(max_runs=3) @with_api_gateways @pytest.mark.parametrize( "from_deployment,to_deployment,change", From 14508429862ed044eebe09893e48ac286fd62a65 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sat, 11 Apr 2020 21:54:52 +0100 Subject: [PATCH 25/34] fix e2e tests s2i version --- testing/scripts/conftest.py | 4 ++-- testing/scripts/seldon_e2e_utils.py | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/testing/scripts/conftest.py b/testing/scripts/conftest.py index 333e6477fd..86132c6867 100644 --- a/testing/scripts/conftest.py +++ b/testing/scripts/conftest.py @@ -1,5 +1,5 @@ import pytest -from seldon_e2e_utils import clean_string, retry_run, get_s2i_python_version +from seldon_e2e_utils import clean_string, retry_run, get_seldon_version from subprocess import run @@ -104,4 +104,4 @@ def delete_seldon(name="seldon", namespace="seldon-system"): def do_s2i_python_version(): - return get_s2i_python_version() + return get_seldon_version() diff --git a/testing/scripts/seldon_e2e_utils.py b/testing/scripts/seldon_e2e_utils.py index a5bd1163fc..d534dfbf1a 100644 --- a/testing/scripts/seldon_e2e_utils.py +++ b/testing/scripts/seldon_e2e_utils.py @@ -18,19 +18,6 @@ API_AMBASSADOR = "localhost:8003" API_ISTIO_GATEWAY = "localhost:8004" - -def get_s2i_python_version(): - cmd = ( - "cd ../../wrappers/s2i/python && " - "grep 'IMAGE_VERSION=' Makefile |" - "cut -d'=' -f2" - ) - ret = Popen(cmd, shell=True, stdout=subprocess.PIPE) - output = ret.stdout.readline() - version = output.decode("utf-8").rstrip() - return version - - def get_seldon_version(): ret = Popen("cat ../../version.txt", shell=True, stdout=subprocess.PIPE) output = ret.stdout.readline() From 1d4a0156831fa645c3a42963965f8ed8ddf65306 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sat, 11 Apr 2020 22:17:30 +0100 Subject: [PATCH 26/34] lint --- testing/scripts/seldon_e2e_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/scripts/seldon_e2e_utils.py b/testing/scripts/seldon_e2e_utils.py index d534dfbf1a..afe58d9e5d 100644 --- a/testing/scripts/seldon_e2e_utils.py +++ b/testing/scripts/seldon_e2e_utils.py @@ -18,6 +18,7 @@ API_AMBASSADOR = "localhost:8003" API_ISTIO_GATEWAY = "localhost:8004" + def get_seldon_version(): ret = Popen("cat ../../version.txt", shell=True, stdout=subprocess.PIPE) output = ret.stdout.readline() From 794afa6ad23b89925ae306948b3ca5a34c416c09 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sun, 12 Apr 2020 08:10:42 +0100 Subject: [PATCH 27/34] Update linter --- .pre-commit-config.yaml | 2 +- .../seldon-operator/hack/create_resources.py | 42 ++++++++++--------- python/Makefile | 2 +- 3 files changed, 24 insertions(+), 22 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 446db62f7e..64136bc918 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,5 +9,5 @@ repos: rev: stable hooks: - id: black - args: ['python/', 'testing/', '--exclude', '(testing/scripts/proto|seldon_core/proto/|.eggs)'] + args: ['python/', 'testing/', 'operator/helm', 'operator/seldon-operator/hack', '--exclude', '(testing/scripts/proto|seldon_core/proto/|.eggs)'] language_version: python3.6 diff --git a/operator/seldon-operator/hack/create_resources.py b/operator/seldon-operator/hack/create_resources.py index e5fe86cbe0..70721416ca 100644 --- a/operator/seldon-operator/hack/create_resources.py +++ b/operator/seldon-operator/hack/create_resources.py @@ -3,20 +3,20 @@ import yaml parser = argparse.ArgumentParser() -parser.add_argument('--input', required=True, help='Input folder') -parser.add_argument('--output', required=True, help='Output folder') +parser.add_argument("--input", required=True, help="Input folder") +parser.add_argument("--output", required=True, help="Output folder") args, _ = parser.parse_known_args() -ROLE_FILE="namespace_role.yaml" -CLUSTERROLE_FILE="cluster_role.yaml" +ROLE_FILE = "namespace_role.yaml" +CLUSTERROLE_FILE = "cluster_role.yaml" -COMBINED_ROLES_FILE="role.yaml" -COMBINED_ROLES_BINDING_FILE="role_binding.yaml" +COMBINED_ROLES_FILE = "role.yaml" +COMBINED_ROLES_BINDING_FILE = "role_binding.yaml" -OPERATOR_FILE="operator.yaml" -SERVICEACCOUNT_FILE="service_account.yaml" +OPERATOR_FILE = "operator.yaml" +SERVICEACCOUNT_FILE = "service_account.yaml" -WEBHOOK_PORT=8443 +WEBHOOK_PORT = 8443 if __name__ == "__main__": exp = args.input + "/*" @@ -28,16 +28,18 @@ serviceAccountName = "seldon-manager" for file in files: - with open(file, 'r') as stream: + with open(file, "r") as stream: res = yaml.safe_load(stream) kind = res["kind"].lower() name = res["metadata"]["name"].lower() - print("Processing ",file) - print(kind,name) + print("Processing ", file) + print(kind, name) if kind == "deployment" and name == "seldon-controller-manager": - serviceAccountName = res["spec"]["template"]["spec"]["serviceAccountName"] + serviceAccountName = res["spec"]["template"]["spec"][ + "serviceAccountName" + ] res["metadata"]["namespace"] = "default" for portSpec in res["spec"]["template"]["spec"]["containers"][0][ @@ -63,17 +65,17 @@ if env["name"] == "ENGINE_CONTAINER_USER": env["value"] = "" - print("Writing ",OPERATOR_FILE) + print("Writing ", OPERATOR_FILE) filename = args.output + "/" + OPERATOR_FILE fdata = yaml.dump(res, width=1000) - with open(filename, 'w') as outfile: + with open(filename, "w") as outfile: outfile.write(fdata) elif kind == "serviceaccount" and name == "seldon-manager": res["metadata"]["namespace"] = "default" print("Writing ", SERVICEACCOUNT_FILE) filename = args.output + "/" + SERVICEACCOUNT_FILE fdata = yaml.dump(res, width=1000) - with open(filename, 'w') as outfile: + with open(filename, "w") as outfile: outfile.write(fdata) elif kind == "role": res["metadata"]["namespace"] = "default" @@ -91,21 +93,21 @@ res["subjects"][0]["namespace"] = "default" filename = args.output + "/" + COMBINED_ROLES_BINDING_FILE fdata = yaml.dump(res, width=1000) - with open(filename, 'w') as outfile: + with open(filename, "w") as outfile: outfile.write(fdata) # Write role yaml roleYaml["metadata"]["name"] = serviceAccountName fdata = yaml.dump(roleYaml, width=1000) filename = args.output + "/" + ROLE_FILE - with open(filename, 'w') as outfile: + with open(filename, "w") as outfile: outfile.write(fdata) # Write clusterrole yaml clusterRoleYaml["metadata"]["name"] = serviceAccountName fdata = yaml.dump(clusterRoleYaml, width=1000) filename = args.output + "/" + CLUSTERROLE_FILE - with open(filename, 'w') as outfile: + with open(filename, "w") as outfile: outfile.write(fdata) # Write combined role yaml @@ -113,5 +115,5 @@ clusterRoleYaml["rules"].append(rule) fdata = yaml.dump(clusterRoleYaml, width=1000) filename = args.output + "/" + COMBINED_ROLES_FILE - with open(filename, 'w') as outfile: + with open(filename, "w") as outfile: outfile.write(fdata) diff --git a/python/Makefile b/python/Makefile index 45514a90f4..35f44b529e 100644 --- a/python/Makefile +++ b/python/Makefile @@ -97,7 +97,7 @@ setup_linter: run_linter: black \ - ./ ../testing ../operator/helm \ + ./ ../testing ../operator/helm ../operator/seldon-operator/hack \ --exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)" run_linter_check: From 6222c7733024e9f3acde66126d38370fc6f3da19 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sun, 12 Apr 2020 14:52:49 +0100 Subject: [PATCH 28/34] updates from review --- .../templates/clusterrole_seldon-webhook-role.yaml | 2 ++ .../clusterrolebinding_seldon-webhook-rolebinding.yaml | 2 ++ .../templates/deployment_seldon-controller-manager.yaml | 4 ++-- .../templates/service_seldon-webhook-service.yaml | 2 +- operator/config/default/kustomization.yaml | 2 +- operator/config/lite/kustomization.yaml | 2 +- .../seldondeployment_prepackaged_servers_test.go | 3 --- operator/helm/split_resources.py | 6 ++++++ operator/seldon-operator/deploy/cluster_role.yaml | 2 +- operator/seldon-operator/deploy/namespace_role.yaml | 2 +- .../1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml | 5 ++--- operator/seldon-operator/deploy/operator.yaml | 6 +++--- operator/seldon-operator/deploy/role.yaml | 2 +- operator/seldon-operator/deploy/role_binding.yaml | 2 +- operator/seldon-operator/deploy/service_account.yaml | 2 +- 15 files changed, 25 insertions(+), 19 deletions(-) diff --git a/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml b/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml index 4555a5a75c..9c92c7b673 100644 --- a/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml +++ b/helm-charts/seldon-core-operator/templates/clusterrole_seldon-webhook-role.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.createResources }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: @@ -42,3 +43,4 @@ rules: - get - patch - update +{{- end }} diff --git a/helm-charts/seldon-core-operator/templates/clusterrolebinding_seldon-webhook-rolebinding.yaml b/helm-charts/seldon-core-operator/templates/clusterrolebinding_seldon-webhook-rolebinding.yaml index b98942b2f3..f0da9cad47 100644 --- a/helm-charts/seldon-core-operator/templates/clusterrolebinding_seldon-webhook-rolebinding.yaml +++ b/helm-charts/seldon-core-operator/templates/clusterrolebinding_seldon-webhook-rolebinding.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.createResources }} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: @@ -15,3 +16,4 @@ subjects: - kind: ServiceAccount name: seldon-manager namespace: '{{ .Release.Namespace }}' +{{- end }} diff --git a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml index 596961f2ac..78bd35878b 100644 --- a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml +++ b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml @@ -16,7 +16,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 control-plane: seldon-controller-manager template: metadata: @@ -27,7 +27,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 control-plane: seldon-controller-manager spec: containers: diff --git a/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml b/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml index 4ff2f610cf..c506ea8961 100644 --- a/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml +++ b/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml @@ -17,6 +17,6 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 control-plane: seldon-controller-manager {{- end }} diff --git a/operator/config/default/kustomization.yaml b/operator/config/default/kustomization.yaml index f5a2faac8f..faaf5d0b4e 100644 --- a/operator/config/default/kustomization.yaml +++ b/operator/config/default/kustomization.yaml @@ -12,7 +12,7 @@ namePrefix: seldon- commonLabels: app: seldon app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 app.kubernetes.io/instance: seldon1 bases: diff --git a/operator/config/lite/kustomization.yaml b/operator/config/lite/kustomization.yaml index cd715c8e10..ca52ca2b29 100644 --- a/operator/config/lite/kustomization.yaml +++ b/operator/config/lite/kustomization.yaml @@ -12,7 +12,7 @@ namePrefix: seldon- commonLabels: app: seldon app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 app.kubernetes.io/instance: seldon1 bases: diff --git a/operator/controllers/seldondeployment_prepackaged_servers_test.go b/operator/controllers/seldondeployment_prepackaged_servers_test.go index a66939ae11..ea63efc0aa 100644 --- a/operator/controllers/seldondeployment_prepackaged_servers_test.go +++ b/operator/controllers/seldondeployment_prepackaged_servers_test.go @@ -87,9 +87,6 @@ var _ = Describe("Create a prepacked sklearn server", func() { Expect(len(depFetched.Spec.Template.Spec.Containers)).Should(Equal(2)) Expect(k8sClient.Delete(context.Background(), instance)).Should(Succeed()) - - //j, _ := json.Marshal(depFetched) - //fmt.Println(string(j)) }) }) diff --git a/operator/helm/split_resources.py b/operator/helm/split_resources.py index 4f4bb6794d..cf2de95608 100644 --- a/operator/helm/split_resources.py +++ b/operator/helm/split_resources.py @@ -274,6 +274,12 @@ def helm_release(value: str): # Spartatkus if name.find("spartakus") > -1: fdata = HELM_SPARTAKUS_IF_START + fdata + HELM_IF_END + elif name == "seldon-webhook-rolebinding" or name == "seldon-webhook-role": + fdata = ( + HELM_CREATERESOURCES_IF_START + +fdata + + HELM_IF_END + ) # cluster roles for single namespace elif name == "seldon-manager-rolebinding" or name == "seldon-manager-role": fdata = ( diff --git a/operator/seldon-operator/deploy/cluster_role.yaml b/operator/seldon-operator/deploy/cluster_role.yaml index 93ad174251..f6f5031e26 100644 --- a/operator/seldon-operator/deploy/cluster_role.yaml +++ b/operator/seldon-operator/deploy/cluster_role.yaml @@ -6,7 +6,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 name: seldon-manager rules: - apiGroups: diff --git a/operator/seldon-operator/deploy/namespace_role.yaml b/operator/seldon-operator/deploy/namespace_role.yaml index d2a09247ec..68449bfa3a 100644 --- a/operator/seldon-operator/deploy/namespace_role.yaml +++ b/operator/seldon-operator/deploy/namespace_role.yaml @@ -5,7 +5,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 name: seldon-manager namespace: default rules: diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index 32afda4037..3d26f31390 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -365,7 +365,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 control-plane: seldon-controller-manager strategy: {} template: @@ -376,7 +376,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 control-plane: seldon-controller-manager spec: containers: @@ -445,7 +445,6 @@ spec: - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX value: http://default-broker. image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT - imagePullPolicy: Always name: manager ports: - containerPort: 8443 diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml index c2caa3730f..7158ec1ed7 100644 --- a/operator/seldon-operator/deploy/operator.yaml +++ b/operator/seldon-operator/deploy/operator.yaml @@ -5,7 +5,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 control-plane: seldon-controller-manager name: seldon-controller-manager namespace: default @@ -16,7 +16,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 control-plane: seldon-controller-manager template: metadata: @@ -26,7 +26,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 control-plane: seldon-controller-manager spec: containers: diff --git a/operator/seldon-operator/deploy/role.yaml b/operator/seldon-operator/deploy/role.yaml index 14a899f914..1398d86803 100644 --- a/operator/seldon-operator/deploy/role.yaml +++ b/operator/seldon-operator/deploy/role.yaml @@ -6,7 +6,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 name: seldon-manager rules: - apiGroups: diff --git a/operator/seldon-operator/deploy/role_binding.yaml b/operator/seldon-operator/deploy/role_binding.yaml index dcbf71efb1..0ef4b2a2d0 100644 --- a/operator/seldon-operator/deploy/role_binding.yaml +++ b/operator/seldon-operator/deploy/role_binding.yaml @@ -5,7 +5,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 name: seldon-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/operator/seldon-operator/deploy/service_account.yaml b/operator/seldon-operator/deploy/service_account.yaml index 3ad921b5f5..d427600861 100644 --- a/operator/seldon-operator/deploy/service_account.yaml +++ b/operator/seldon-operator/deploy/service_account.yaml @@ -5,6 +5,6 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 name: seldon-manager namespace: default From ba85b4b6a4a9fd8049668e36b81d7bff2eb0c2a1 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sun, 12 Apr 2020 15:26:47 +0100 Subject: [PATCH 29/34] add missing test resources --- notebooks/resources/model_bad_volume.yaml | 23 ++++++++++++ notebooks/resources/model_long_name.yaml | 20 +++++++++++ notebooks/resources/model_new_name.yaml | 20 +++++++++++ notebooks/resources/model_noreplicas.yaml | 20 +++++++++++ notebooks/resources/model_replicas.yaml | 44 +++++++++++++++++++++++ notebooks/resources/model_resources.yaml | 27 ++++++++++++++ notebooks/resources/model_scale.yaml | 20 +++++++++++ 7 files changed, 174 insertions(+) create mode 100644 notebooks/resources/model_bad_volume.yaml create mode 100644 notebooks/resources/model_long_name.yaml create mode 100644 notebooks/resources/model_new_name.yaml create mode 100644 notebooks/resources/model_noreplicas.yaml create mode 100644 notebooks/resources/model_replicas.yaml create mode 100644 notebooks/resources/model_resources.yaml create mode 100644 notebooks/resources/model_scale.yaml diff --git a/notebooks/resources/model_bad_volume.yaml b/notebooks/resources/model_bad_volume.yaml new file mode 100644 index 0000000000..0bb50f6b65 --- /dev/null +++ b/notebooks/resources/model_bad_volume.yaml @@ -0,0 +1,23 @@ +apiVersion: machinelearning.seldon.io/v1 +kind: SeldonDeployment +metadata: + name: seldon-model +spec: + name: test-deployment + predictors: + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier + volumeMounts: + - mountPath: /tmp/vol + name: myvolume + graph: + children: [] + endpoint: + type: REST + name: classifier + type: MODEL + name: example + replicas: 1 diff --git a/notebooks/resources/model_long_name.yaml b/notebooks/resources/model_long_name.yaml new file mode 100644 index 0000000000..6ceaf64893 --- /dev/null +++ b/notebooks/resources/model_long_name.yaml @@ -0,0 +1,20 @@ +apiVersion: machinelearning.seldon.io/v1 +kind: SeldonDeployment +metadata: + name: seldon-model-1234567890-1234567890-1234567890-1234567890-1234567890 +spec: + name: test-deployment + predictors: + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier + graph: + children: [] + endpoint: + type: REST + name: classifier + type: MODEL + name: example-1234567890 + replicas: 1 diff --git a/notebooks/resources/model_new_name.yaml b/notebooks/resources/model_new_name.yaml new file mode 100644 index 0000000000..00fe93f64b --- /dev/null +++ b/notebooks/resources/model_new_name.yaml @@ -0,0 +1,20 @@ +apiVersion: machinelearning.seldon.io/v1 +kind: SeldonDeployment +metadata: + name: seldon-model +spec: + name: test-deployment + predictors: + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier2 + graph: + children: [] + endpoint: + type: REST + name: classifier2 + type: MODEL + name: example + replicas: 1 diff --git a/notebooks/resources/model_noreplicas.yaml b/notebooks/resources/model_noreplicas.yaml new file mode 100644 index 0000000000..9ccf7c4727 --- /dev/null +++ b/notebooks/resources/model_noreplicas.yaml @@ -0,0 +1,20 @@ +apiVersion: machinelearning.seldon.io/v1 +kind: SeldonDeployment +metadata: + name: seldon-model +spec: + name: test-deployment + predictors: + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier + graph: + children: [] + endpoint: + type: REST + name: classifier + type: MODEL + name: example + diff --git a/notebooks/resources/model_replicas.yaml b/notebooks/resources/model_replicas.yaml new file mode 100644 index 0000000000..5a3064cd7e --- /dev/null +++ b/notebooks/resources/model_replicas.yaml @@ -0,0 +1,44 @@ +apiVersion: machinelearning.seldon.io/v1 +kind: SeldonDeployment +metadata: + name: test-replicas +spec: + replicas: 1 + predictors: + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier2 + replicas: 3 + graph: + endpoint: + type: REST + name: classifier + type: MODEL + children: + - name: classifier2 + type: MODEL + endpoint: + type: REST + name: example + replicas: 2 + traffic: 50 + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier3 + graph: + children: [] + endpoint: + type: REST + name: classifier3 + type: MODEL + name: example2 + traffic: 50 + diff --git a/notebooks/resources/model_resources.yaml b/notebooks/resources/model_resources.yaml new file mode 100644 index 0000000000..3e79977dea --- /dev/null +++ b/notebooks/resources/model_resources.yaml @@ -0,0 +1,27 @@ +apiVersion: machinelearning.seldon.io/v1 +kind: SeldonDeployment +metadata: + name: seldon-model +spec: + name: test-deployment + predictors: + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier + resources: + requests: + memory: 1Gi + cpu: 1 + limits: + memory: 1Gi + cpu: 2 + graph: + children: [] + endpoint: + type: REST + name: classifier + type: MODEL + name: example + replicas: 1 diff --git a/notebooks/resources/model_scale.yaml b/notebooks/resources/model_scale.yaml new file mode 100644 index 0000000000..19a3c04afe --- /dev/null +++ b/notebooks/resources/model_scale.yaml @@ -0,0 +1,20 @@ +apiVersion: machinelearning.seldon.io/v1 +kind: SeldonDeployment +metadata: + name: seldon-scale +spec: + replicas: 1 + predictors: + - componentSpecs: + - spec: + containers: + - image: seldonio/mock_classifier_rest:1.3 + name: classifier + graph: + children: [] + endpoint: + type: REST + name: classifier + type: MODEL + name: example + From 70dc811d6c5677295fdf28b36b36937e153492db Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sun, 12 Apr 2020 16:26:30 +0100 Subject: [PATCH 30/34] fix flakiness of rolling updates notebook running as test --- notebooks/rolling_updates.ipynb | 42 ++++++++++++++----- ...elearning.seldon.io_seldondeployments.yaml | 2 +- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/notebooks/rolling_updates.ipynb b/notebooks/rolling_updates.ipynb index 3078be55ad..4a6f536747 100644 --- a/notebooks/rolling_updates.ipynb +++ b/notebooks/rolling_updates.ipynb @@ -106,9 +106,13 @@ "outputs": [], "source": [ "time.sleep(5) # To allow operator to start the update\n", - "for i in range(60):\n", + "for i in range(120):\n", " responseRaw=!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' -X POST http://localhost:8003/seldon/seldon/fixed/api/v1.0/predictions -H \"Content-Type: application/json\"\n", - " response = json.loads(responseRaw[0])\n", + " try:\n", + " response = json.loads(responseRaw[0])\n", + " except:\n", + " print(\"Failed to parse json\",responseRaw)\n", + " continue\n", " assert(response['data']['ndarray'][0]==1 or response['data']['ndarray'][0]==5)\n", " jsonRaw=!kubectl get deploy -l seldon-deployment-id=fixed -o json\n", " data=\"\".join(jsonRaw)\n", @@ -198,9 +202,13 @@ "outputs": [], "source": [ "time.sleep(5) # To allow operator to start the update\n", - "for i in range(60):\n", + "for i in range(120):\n", " responseRaw=!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' -X POST http://localhost:8003/seldon/seldon/fixed/api/v1.0/predictions -H \"Content-Type: application/json\"\n", - " response = json.loads(responseRaw[0])\n", + " try:\n", + " response = json.loads(responseRaw[0])\n", + " except:\n", + " print(\"Failed to parse json\",responseRaw)\n", + " continue \n", " assert(response['data']['ndarray'][0]==1 or response['data']['ndarray'][0]==5)\n", " jsonRaw=!kubectl get deploy -l seldon-deployment-id=fixed -o json\n", " data=\"\".join(jsonRaw)\n", @@ -290,9 +298,13 @@ "outputs": [], "source": [ "time.sleep(5) # To allow operator to start the update\n", - "for i in range(60):\n", + "for i in range(120):\n", " responseRaw=!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' -X POST http://localhost:8003/seldon/seldon/fixed/api/v1.0/predictions -H \"Content-Type: application/json\"\n", - " response = json.loads(responseRaw[0])\n", + " try:\n", + " response = json.loads(responseRaw[0])\n", + " except:\n", + " print(\"Failed to parse json\",responseRaw)\n", + " continue\n", " assert(response['data']['ndarray'][0]==1 or response['data']['ndarray'][0]==5)\n", " jsonRaw=!kubectl get deploy -l seldon-deployment-id=fixed -o json\n", " data=\"\".join(jsonRaw)\n", @@ -382,9 +394,13 @@ "outputs": [], "source": [ "time.sleep(5) # To allow operator to start the update\n", - "for i in range(60):\n", + "for i in range(120):\n", " responseRaw=!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' -X POST http://localhost:8003/seldon/seldon/fixed/api/v1.0/predictions -H \"Content-Type: application/json\"\n", - " response = json.loads(responseRaw[0])\n", + " try:\n", + " response = json.loads(responseRaw[0])\n", + " except:\n", + " print(\"Failed to parse json\",responseRaw)\n", + " continue\n", " assert(response['data']['ndarray'][0]==1 or response['data']['ndarray'][0]==5)\n", " jsonRaw=!kubectl get deploy -l seldon-deployment-id=fixed -o json\n", " data=\"\".join(jsonRaw)\n", @@ -475,10 +491,14 @@ "metadata": {}, "outputs": [], "source": [ - "time.sleep(5) # To allow operator to start the update\n", - "for i in range(60):\n", + "time.sleep(5)\n", + "for i in range(120):\n", " responseRaw=!curl -s -d '{\"data\": {\"ndarray\":[[1.0, 2.0, 5.0]]}}' -X POST http://localhost:8003/seldon/seldon/fixed/api/v1.0/predictions -H \"Content-Type: application/json\"\n", - " response = json.loads(responseRaw[0])\n", + " try:\n", + " response = json.loads(responseRaw[0])\n", + " except:\n", + " print(\"Failed to parse json\",responseRaw)\n", + " continue\n", " assert(response['data']['ndarray'][0]==1 or response['data']['ndarray'][0]==5)\n", " jsonRaw=!kubectl get deploy -l seldon-deployment-id=fixed -o json\n", " data=\"\".join(jsonRaw)\n", diff --git a/operator/testing/machinelearning.seldon.io_seldondeployments.yaml b/operator/testing/machinelearning.seldon.io_seldondeployments.yaml index fcb226311b..0805fd0588 100644 --- a/operator/testing/machinelearning.seldon.io_seldondeployments.yaml +++ b/operator/testing/machinelearning.seldon.io_seldondeployments.yaml @@ -9,7 +9,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v0.5 + app.kubernetes.io/version: v1.1.0 name: seldondeployments.machinelearning.seldon.io spec: group: machinelearning.seldon.io From 7b12aa38885286aec28eec6dec554d07cdf671c4 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Sun, 12 Apr 2020 20:40:51 +0100 Subject: [PATCH 31/34] update alibiexplainer image to handle running as non root user id --- operator/controllers/seldondeployment_explainers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator/controllers/seldondeployment_explainers.go b/operator/controllers/seldondeployment_explainers.go index d76957f405..a247a8b5fd 100644 --- a/operator/controllers/seldondeployment_explainers.go +++ b/operator/controllers/seldondeployment_explainers.go @@ -56,7 +56,7 @@ func createExplainer(r *SeldonDeploymentReconciler, mlDep *machinelearningv1.Sel if explainerContainer.Image == "" { // TODO: should use explainer type but this is the only one available currently - explainerContainer.Image = "seldonio/alibiexplainer:0.1.1" + explainerContainer.Image = "seldonio/alibiexplainer:1.1.0" } // explainer can get port from spec or from containerSpec or fall back on default From 52b2eca994336f6d1857d9db0283e5be0ce750a7 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Mon, 13 Apr 2020 10:10:25 +0100 Subject: [PATCH 32/34] Add new env for DEFAULT_USER_ID to allow user if to be defaulted for all created containers at pod level --- .../deployment_seldon-controller-manager.yaml | 2 + helm-charts/seldon-core-operator/values.yaml | 6 +++ notebooks/explainer_examples.ipynb | 2 +- operator/config/manager/manager.yaml | 2 + operator/controllers/security.go | 45 ++++++------------- operator/controllers/security_test.go | 2 +- .../controllers/seldondeployment_engine.go | 36 +++++++++++++++ operator/helm/split_resources.py | 1 + ...operator.v1.1.0.clusterserviceversion.yaml | 2 + operator/seldon-operator/deploy/operator.yaml | 2 + 10 files changed, 67 insertions(+), 33 deletions(-) diff --git a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml index 78bd35878b..76229ff286 100644 --- a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml +++ b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml @@ -101,6 +101,8 @@ spec: value: '{{ .Values.executor.serviceAccount.name }}' - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX value: '{{ .Values.executor.defaultRequestLoggerEndpointPrefix }}' + - name: DEFAULT_USER_ID + value: '{{ .Values.defaultUserID }}' image: '{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}' imagePullPolicy: '{{ .Values.image.pullPolicy }}' name: manager diff --git a/helm-charts/seldon-core-operator/values.yaml b/helm-charts/seldon-core-operator/values.yaml index f9ad003829..7f28472df9 100644 --- a/helm-charts/seldon-core-operator/values.yaml +++ b/helm-charts/seldon-core-operator/values.yaml @@ -28,6 +28,12 @@ controllerId: "" # Whether to create the webhook service, and webhookconfigurations on startup createResources: false +# Default user id to add to all Pod Security Context as the default +# Use this to ensure all container run as non-root by default +# For openshift leave blank as usually this will be injected automatically on an openshift cluster +# to all pods. +defaultUserID: "" + # ## Service Orchestrator (Executor) # The executor is the default service orchestrator which has superceeded the "Java Engine" executor: diff --git a/notebooks/explainer_examples.ipynb b/notebooks/explainer_examples.ipynb index 3b7fa2fb2b..b9478e4728 100644 --- a/notebooks/explainer_examples.ipynb +++ b/notebooks/explainer_examples.ipynb @@ -278,7 +278,7 @@ "outputs": [], "source": [ "!curl -d '{\"data\": {\"ndarray\":[\"This film has great actors\"]}}' \\\n", - " -X POST http://localhost:8004/seldon/seldon/movie/api/v1.0/predictions \\\n", + " -X POST http://localhost:8003/seldon/seldon/movie/api/v1.0/predictions \\\n", " -H \"Content-Type: application/json\"" ] }, diff --git a/operator/config/manager/manager.yaml b/operator/config/manager/manager.yaml index ace99e6b61..b1a3149ea6 100644 --- a/operator/config/manager/manager.yaml +++ b/operator/config/manager/manager.yaml @@ -95,6 +95,8 @@ spec: value: default - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX value: "http://default-broker." + - name: DEFAULT_USER_ID + value: '' image: controller:latest name: manager resources: diff --git a/operator/controllers/security.go b/operator/controllers/security.go index 7b73b47173..bd59708446 100644 --- a/operator/controllers/security.go +++ b/operator/controllers/security.go @@ -3,44 +3,27 @@ package controllers import ( machinelearningv1 "github.com/seldonio/seldon-core/operator/apis/machinelearning.seldon.io/v1" corev1 "k8s.io/api/core/v1" + "os" "strconv" ) -func getSvcOrchUser(mlDep *machinelearningv1.SeldonDeployment) (*int64, error) { - - if isExecutorEnabled(mlDep) { - if envExecutorUser != "" { - user, err := strconv.Atoi(envExecutorUser) - if err != nil { - return nil, err - } else { - engineUser := int64(user) - return &engineUser, nil - } - } +const ( + ENV_DEFAULT_USER_ID = "DEFAULT_USER_ID" +) - } else { - if envEngineUser != "" { - user, err := strconv.Atoi(envEngineUser) - if err != nil { - return nil, err - } else { - engineUser := int64(user) - return &engineUser, nil - } - } - } - return nil, nil -} +var ( + envDefaultUser = os.Getenv(ENV_DEFAULT_USER_ID) +) func createSecurityContext(mlDep *machinelearningv1.SeldonDeployment) (*corev1.PodSecurityContext, error) { - svcOrchUser, err := getSvcOrchUser(mlDep) - if err != nil { - return nil, err - } - if svcOrchUser != nil { + if envDefaultUser != "" { + user, err := strconv.Atoi(envDefaultUser) + if err != nil { + return nil, err + } + userId := int64(user) return &corev1.PodSecurityContext{ - RunAsUser: svcOrchUser, + RunAsUser: &userId, }, nil } return nil, nil diff --git a/operator/controllers/security_test.go b/operator/controllers/security_test.go index 363629b4e8..8af0d69c98 100644 --- a/operator/controllers/security_test.go +++ b/operator/controllers/security_test.go @@ -61,7 +61,7 @@ func TestGetSecurityContextExecutorUser(t *testing.T) { }, Spec: machinelearningv1.SeldonDeploymentSpec{Annotations: map[string]string{machinelearningv1.ANNOTATION_EXECUTOR: "true"}}, } - envExecutorUser = "2" + envDefaultUser = "2" sc, err := createSecurityContext(mlDep) g.Expect(err).To(BeNil()) diff --git a/operator/controllers/seldondeployment_engine.go b/operator/controllers/seldondeployment_engine.go index 70b87c094f..591c3a4710 100644 --- a/operator/controllers/seldondeployment_engine.go +++ b/operator/controllers/seldondeployment_engine.go @@ -173,6 +173,33 @@ func getSvcOrchSvcAccountName(mlDep *machinelearningv1.SeldonDeployment) string return svcAccount } +func getSvcOrchUser(mlDep *machinelearningv1.SeldonDeployment) (*int64, error) { + + if isExecutorEnabled(mlDep) { + if envExecutorUser != "" { + user, err := strconv.Atoi(envExecutorUser) + if err != nil { + return nil, err + } else { + engineUser := int64(user) + return &engineUser, nil + } + } + + } else { + if envEngineUser != "" { + user, err := strconv.Atoi(envEngineUser) + if err != nil { + return nil, err + } else { + engineUser := int64(user) + return &engineUser, nil + } + } + } + return nil, nil +} + func createExecutorContainer(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, predictorB64 string, http_port int, grpc_port int, resources *corev1.ResourceRequirements) (*corev1.Container, error) { transport := mlDep.Spec.Transport //Backwards compatible with older resources @@ -304,6 +331,11 @@ func createEngineContainerSpec(mlDep *machinelearningv1.SeldonDeployment, p *mac // Create the Container for the service orchestrator. func createEngineContainer(mlDep *machinelearningv1.SeldonDeployment, p *machinelearningv1.PredictorSpec, engine_http_port, engine_grpc_port int) (*corev1.Container, error) { + // Get engine user + engineUser, err := getSvcOrchUser(mlDep) + if err != nil { + return nil, err + } // get predictor as base64 encoded json pCopy := p.DeepCopy() // Set traffic to zero to ensure this doesn't cause a diff in the resulting deployment created @@ -345,6 +377,10 @@ func createEngineContainer(mlDep *machinelearningv1.SeldonDeployment, p *machine } } + if engineUser != nil { + c.SecurityContext = &corev1.SecurityContext{RunAsUser: engineUser} + } + // Environment vars if specified svcOrchEnvMap := make(map[string]string) if p.SvcOrchSpec.Env != nil { diff --git a/operator/helm/split_resources.py b/operator/helm/split_resources.py index cf2de95608..94a263d5cc 100644 --- a/operator/helm/split_resources.py +++ b/operator/helm/split_resources.py @@ -52,6 +52,7 @@ "EXECUTOR_CONTAINER_SERVICE_ACCOUNT_NAME": "executor.serviceAccount.name", "CREATE_RESOURCES": "createResources", "EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX": "executor.defaultRequestLoggerEndpointPrefix", + "DEFAULT_USER_ID": "defaultUserID", } HELM_VALUES_IMAGE_PULL_POLICY = "{{ .Values.image.pullPolicy }}" diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index 3d26f31390..dfa6c26330 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -444,7 +444,9 @@ spec: value: default - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX value: http://default-broker. + - name: DEFAULT_USER_ID image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT + imagePullPolicy: Always name: manager ports: - containerPort: 8443 diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml index 7158ec1ed7..62152ce906 100644 --- a/operator/seldon-operator/deploy/operator.yaml +++ b/operator/seldon-operator/deploy/operator.yaml @@ -99,6 +99,8 @@ spec: value: default - name: EXECUTOR_REQUEST_LOGGER_DEFAULT_ENDPOINT_PREFIX value: http://default-broker. + - name: DEFAULT_USER_ID + value: '' image: seldonio/seldon-core-operator:1.1.0-SNAPSHOT name: manager ports: From 9818538875d1043434e753a0fab514db7cb34d46 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Mon, 13 Apr 2020 10:10:45 +0100 Subject: [PATCH 33/34] lint --- operator/helm/split_resources.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/operator/helm/split_resources.py b/operator/helm/split_resources.py index 94a263d5cc..973aeb013e 100644 --- a/operator/helm/split_resources.py +++ b/operator/helm/split_resources.py @@ -276,11 +276,7 @@ def helm_release(value: str): if name.find("spartakus") > -1: fdata = HELM_SPARTAKUS_IF_START + fdata + HELM_IF_END elif name == "seldon-webhook-rolebinding" or name == "seldon-webhook-role": - fdata = ( - HELM_CREATERESOURCES_IF_START - +fdata - + HELM_IF_END - ) + fdata = HELM_CREATERESOURCES_IF_START + fdata + HELM_IF_END # cluster roles for single namespace elif name == "seldon-manager-rolebinding" or name == "seldon-manager-role": fdata = ( From bc05a9464a267e2c6ab756c6d7054a7f0912cf46 Mon Sep 17 00:00:00 2001 From: cliveseldon Date: Mon, 13 Apr 2020 17:27:44 +0100 Subject: [PATCH 34/34] revert to label v0.5 due to helm upgrade issues --- .../templates/deployment_seldon-controller-manager.yaml | 4 ++-- .../templates/service_seldon-webhook-service.yaml | 2 +- operator/config/default/kustomization.yaml | 2 +- operator/config/lite/kustomization.yaml | 2 +- operator/seldon-operator/deploy/cluster_role.yaml | 2 +- operator/seldon-operator/deploy/namespace_role.yaml | 2 +- .../1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml | 4 ++-- operator/seldon-operator/deploy/operator.yaml | 6 +++--- operator/seldon-operator/deploy/role.yaml | 2 +- operator/seldon-operator/deploy/role_binding.yaml | 2 +- operator/seldon-operator/deploy/service_account.yaml | 2 +- .../machinelearning.seldon.io_seldondeployments.yaml | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml index 76229ff286..b2b2fe002c 100644 --- a/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml +++ b/helm-charts/seldon-core-operator/templates/deployment_seldon-controller-manager.yaml @@ -16,7 +16,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager template: metadata: @@ -27,7 +27,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager spec: containers: diff --git a/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml b/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml index c506ea8961..4ff2f610cf 100644 --- a/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml +++ b/helm-charts/seldon-core-operator/templates/service_seldon-webhook-service.yaml @@ -17,6 +17,6 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager {{- end }} diff --git a/operator/config/default/kustomization.yaml b/operator/config/default/kustomization.yaml index faaf5d0b4e..f5a2faac8f 100644 --- a/operator/config/default/kustomization.yaml +++ b/operator/config/default/kustomization.yaml @@ -12,7 +12,7 @@ namePrefix: seldon- commonLabels: app: seldon app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 app.kubernetes.io/instance: seldon1 bases: diff --git a/operator/config/lite/kustomization.yaml b/operator/config/lite/kustomization.yaml index ca52ca2b29..cd715c8e10 100644 --- a/operator/config/lite/kustomization.yaml +++ b/operator/config/lite/kustomization.yaml @@ -12,7 +12,7 @@ namePrefix: seldon- commonLabels: app: seldon app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 app.kubernetes.io/instance: seldon1 bases: diff --git a/operator/seldon-operator/deploy/cluster_role.yaml b/operator/seldon-operator/deploy/cluster_role.yaml index f6f5031e26..93ad174251 100644 --- a/operator/seldon-operator/deploy/cluster_role.yaml +++ b/operator/seldon-operator/deploy/cluster_role.yaml @@ -6,7 +6,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 name: seldon-manager rules: - apiGroups: diff --git a/operator/seldon-operator/deploy/namespace_role.yaml b/operator/seldon-operator/deploy/namespace_role.yaml index 68449bfa3a..d2a09247ec 100644 --- a/operator/seldon-operator/deploy/namespace_role.yaml +++ b/operator/seldon-operator/deploy/namespace_role.yaml @@ -5,7 +5,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 name: seldon-manager namespace: default rules: diff --git a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml index dfa6c26330..b47192c958 100644 --- a/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml +++ b/operator/seldon-operator/deploy/olm-catalog/seldon-operator/1.1.0/seldon-operator.v1.1.0.clusterserviceversion.yaml @@ -365,7 +365,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager strategy: {} template: @@ -376,7 +376,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager spec: containers: diff --git a/operator/seldon-operator/deploy/operator.yaml b/operator/seldon-operator/deploy/operator.yaml index 62152ce906..d734371758 100644 --- a/operator/seldon-operator/deploy/operator.yaml +++ b/operator/seldon-operator/deploy/operator.yaml @@ -5,7 +5,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager name: seldon-controller-manager namespace: default @@ -16,7 +16,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager template: metadata: @@ -26,7 +26,7 @@ spec: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 control-plane: seldon-controller-manager spec: containers: diff --git a/operator/seldon-operator/deploy/role.yaml b/operator/seldon-operator/deploy/role.yaml index 1398d86803..14a899f914 100644 --- a/operator/seldon-operator/deploy/role.yaml +++ b/operator/seldon-operator/deploy/role.yaml @@ -6,7 +6,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 name: seldon-manager rules: - apiGroups: diff --git a/operator/seldon-operator/deploy/role_binding.yaml b/operator/seldon-operator/deploy/role_binding.yaml index 0ef4b2a2d0..dcbf71efb1 100644 --- a/operator/seldon-operator/deploy/role_binding.yaml +++ b/operator/seldon-operator/deploy/role_binding.yaml @@ -5,7 +5,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 name: seldon-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/operator/seldon-operator/deploy/service_account.yaml b/operator/seldon-operator/deploy/service_account.yaml index d427600861..3ad921b5f5 100644 --- a/operator/seldon-operator/deploy/service_account.yaml +++ b/operator/seldon-operator/deploy/service_account.yaml @@ -5,6 +5,6 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 name: seldon-manager namespace: default diff --git a/operator/testing/machinelearning.seldon.io_seldondeployments.yaml b/operator/testing/machinelearning.seldon.io_seldondeployments.yaml index 0805fd0588..fcb226311b 100644 --- a/operator/testing/machinelearning.seldon.io_seldondeployments.yaml +++ b/operator/testing/machinelearning.seldon.io_seldondeployments.yaml @@ -9,7 +9,7 @@ metadata: app: seldon app.kubernetes.io/instance: seldon1 app.kubernetes.io/name: seldon - app.kubernetes.io/version: v1.1.0 + app.kubernetes.io/version: v0.5 name: seldondeployments.machinelearning.seldon.io spec: group: machinelearning.seldon.io