forked from kubeflow/training-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable e2e test against universal operator (kubeflow#1336)
* Fix make test failures Since we’ve moved the crd folder, we need to fix relative path correspondingly * Fix openAPIV3Schema validation issue See kubeflow#1324 for more details. * Clean up kubebuilder manifest 1. Remove unused webhook and cainjection patches in crd 2. Not sure why role.yaml is missing. I add it back manually 3. Comment out unused components * Add e2e test against universal training operator 1. Copy original ksonnet workflow with minor changes to build/install operator 2. Add scripts to setup universal operator using kustomization files 3. Add new test entry in prow_config.yaml * Fix invalid_job test case Original test case is not working anymore because we have validations on custom resource. I change to catch the error message to check is validation exception is part of it. * Remove unless files to reduce commit size * Move main.go to cmd folder * Remove workflow_v2 and change original test instead Since we already have v1.1-branch, we don’t have to make two test pipeline working at the same time. v1.1-branch will still run legacy pipeline and new test for universal training operator will run against master * Add Optional tag in RunPolicy This makes sure CRD remove required check for RunPolicy. * Fix test failures 1. Change PULL_BASE_SHA to PULL_PULL_SHA 2. Explicitly set defaults for jobs. Somehow, scheme registration doesn’t work expectedly
- Loading branch information
Showing
42 changed files
with
229 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Build the manager binary | ||
FROM golang:1.14.9 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 . . | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager cmd/training-operator.v1/main.go | ||
|
||
# Use distroless as minimal base image to package the manager binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM gcr.io/distroless/static:latest | ||
WORKDIR / | ||
COPY --from=builder /workspace/manager . | ||
ENTRYPOINT ["/manager"] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
# This file is for teaching kustomize how to substitute name and namespace reference in CRD | ||
nameReference: | ||
- kind: Service | ||
version: v1 | ||
fieldSpecs: | ||
- kind: CustomResourceDefinition | ||
- kind: Service | ||
version: v1 | ||
group: apiextensions.k8s.io | ||
path: spec/conversion/webhook/clientConfig/service/name | ||
fieldSpecs: | ||
- kind: CustomResourceDefinition | ||
version: v1 | ||
group: apiextensions.k8s.io | ||
path: spec/conversion/webhook/clientConfig/service/name | ||
|
||
namespace: | ||
- kind: CustomResourceDefinition | ||
version: v1 | ||
group: apiextensions.k8s.io | ||
path: spec/conversion/webhook/clientConfig/service/namespace | ||
create: false | ||
- kind: CustomResourceDefinition | ||
version: v1 | ||
group: apiextensions.k8s.io | ||
path: spec/conversion/webhook/clientConfig/service/namespace | ||
create: false | ||
|
||
varReference: | ||
- path: metadata/annotations | ||
- path: metadata/annotations |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,11 @@ | ||
# Adds namespace to all resources. | ||
namespace: tf-operator-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: tf-operator- | ||
namespace: kubeflow | ||
|
||
# Labels to add to all resources and selectors. | ||
#commonLabels: | ||
# someName: someValue | ||
|
||
bases: | ||
resources: | ||
- ../crd | ||
- ../rbac | ||
- ../manager | ||
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in | ||
# crd/kustomization.yaml | ||
#- ../webhook | ||
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. 'WEBHOOK' components are required. | ||
#- ../certmanager | ||
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'. | ||
#- ../prometheus | ||
|
||
patchesStrategicMerge: | ||
# Protect the /metrics endpoint by putting it behind auth. | ||
# If you want your controller-manager to expose the /metrics | ||
# endpoint w/o any authn/z, please comment the following line. | ||
- manager_auth_proxy_patch.yaml | ||
|
||
# Mount the controller config file for loading manager configurations | ||
# through a ComponentConfig type | ||
#- manager_config_patch.yaml | ||
|
||
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in | ||
# crd/kustomization.yaml | ||
#- manager_webhook_patch.yaml | ||
|
||
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER'. | ||
# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA injection in the admission webhooks. | ||
# 'CERTMANAGER' needs to be enabled to use ca injection | ||
#- webhookcainjection_patch.yaml | ||
|
||
# the following config is for teaching kustomize how to do var substitution | ||
vars: | ||
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix. | ||
#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR | ||
# objref: | ||
# kind: Certificate | ||
# group: cert-manager.io | ||
# version: v1 | ||
# name: serving-cert # this name should match the one in certificate.yaml | ||
# fieldref: | ||
# fieldpath: metadata.namespace | ||
#- name: CERTIFICATE_NAME | ||
# objref: | ||
# kind: Certificate | ||
# group: cert-manager.io | ||
# version: v1 | ||
# name: serving-cert # this name should match the one in certificate.yaml | ||
#- name: SERVICE_NAMESPACE # namespace of the service | ||
# objref: | ||
# kind: Service | ||
# version: v1 | ||
# name: webhook-service | ||
# fieldref: | ||
# fieldpath: metadata.namespace | ||
#- name: SERVICE_NAME | ||
# objref: | ||
# kind: Service | ||
# version: v1 | ||
# name: webhook-service |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
resources: | ||
- manager.yaml | ||
|
||
generatorOptions: | ||
disableNameSuffixHash: true | ||
|
||
configMapGenerator: | ||
- name: manager-config | ||
files: | ||
- controller_manager_config.yaml | ||
#generatorOptions: | ||
# disableNameSuffixHash: true | ||
# | ||
#configMapGenerator: | ||
#- files: | ||
# - controller_manager_config.yaml | ||
# name: manager-config | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
images: | ||
- name: kubeflow/training-operator | ||
newName: kubeflow/training-operator | ||
newTag: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.