Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Remove v1beta1 diff compare #70

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
663 changes: 0 additions & 663 deletions Gopkg.lock

This file was deleted.

46 changes: 0 additions & 46 deletions Gopkg.toml

This file was deleted.

4 changes: 2 additions & 2 deletions build/frameworkcontroller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE

FROM golang:1.12.6-alpine as builder
FROM golang:1.17.5-alpine3.15 as builder

ENV PROJECT_DIR=${GOPATH}/src/github.com/microsoft/frameworkcontroller
ENV INSTALL_DIR=/opt/frameworkcontroller/frameworkcontroller
Expand All @@ -32,7 +32,7 @@ RUN ${PROJECT_DIR}/build/frameworkcontroller/go-build.sh && \
mv ${PROJECT_DIR}/dist/frameworkcontroller/* ${INSTALL_DIR}


FROM alpine:3.10.1
FROM alpine

ENV INSTALL_DIR=/opt/frameworkcontroller/frameworkcontroller

Expand Down
59 changes: 59 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
module github.com/microsoft/frameworkcontroller

go 1.17

require (
github.com/pkg/errors v0.9.1
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.23.1
k8s.io/apiextensions-apiserver v0.23.1
k8s.io/apimachinery v0.23.1
k8s.io/client-go v0.23.1
k8s.io/code-generator v0.23.1
k8s.io/klog v1.0.0
)

require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
927 changes: 927 additions & 0 deletions go.sum

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright The Kubernetes Authors.
Copyright 2021.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -13,4 +13,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

10 changes: 5 additions & 5 deletions vendor/k8s.io/api/node/v1beta1/doc.go → hack/tools.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// +build tools

/*
Copyright 2019 The Kubernetes Authors.

Expand All @@ -14,9 +16,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:deepcopy-gen=package
// +k8s:openapi-gen=true

// +groupName=node.k8s.io
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
package tools

package v1beta1 // import "k8s.io/api/node/v1beta1"
import _ "k8s.io/code-generator"
4 changes: 3 additions & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ cd ${PROJECT_DIR}
"all" \
github.com/microsoft/frameworkcontroller/pkg/client \
github.com/microsoft/frameworkcontroller/pkg/apis \
frameworkcontroller:v1
frameworkcontroller:v1 \
--go-header-file "${PROJECT_DIR}"/hack/boilerplate.go.txt \
--output-base "${PROJECT_DIR}"

echo Succeeded to update generated code
69 changes: 59 additions & 10 deletions pkg/apis/frameworkcontroller/v1/crd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package v1

import (
"github.com/microsoft/frameworkcontroller/pkg/common"
apiExtensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"
apiExtensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand All @@ -39,19 +39,22 @@ func BuildFrameworkCRD() *apiExtensions.CustomResourceDefinition {
Name: FrameworkCRDName,
},
Spec: apiExtensions.CustomResourceDefinitionSpec{
Group: GroupName,
Version: SchemeGroupVersion.Version,
Scope: apiExtensions.NamespaceScoped,
Group: GroupName,
Names: apiExtensions.CustomResourceDefinitionNames{
Plural: FrameworkPlural,
Kind: FrameworkKind,
},
Validation: buildFrameworkValidation(),
// TODO: Enable CRD Subresources after ApiServer has supported it.
//Subresources: &apiExtensions.CustomResourceSubresources{
// Status: &apiExtensions.CustomResourceSubresourceStatus{
// },
//},
Scope: apiExtensions.NamespaceScoped,
Versions: []apiExtensions.CustomResourceDefinitionVersion{
{
Name: "v1",
Served: true,
Storage: true,
Deprecated: false,
DeprecationWarning: nil,
Schema: buildFrameworkValidation(),
},
},
},
}

Expand All @@ -61,8 +64,10 @@ func BuildFrameworkCRD() *apiExtensions.CustomResourceDefinition {
func buildFrameworkValidation() *apiExtensions.CustomResourceValidation {
return &apiExtensions.CustomResourceValidation{
OpenAPIV3Schema: &apiExtensions.JSONSchemaProps{
Type: "object",
Properties: map[string]apiExtensions.JSONSchemaProps{
"metadata": {
Type: "object",
Properties: map[string]apiExtensions.JSONSchemaProps{
"name": {
Type: "string",
Expand All @@ -71,27 +76,39 @@ func buildFrameworkValidation() *apiExtensions.CustomResourceValidation {
},
},
"spec": {
Type: "object",
Properties: map[string]apiExtensions.JSONSchemaProps{
"description": {
Type: "string",
Nullable: true,
},
"executionType": {
Type: "string",
Enum: []apiExtensions.JSON{
{Raw: []byte(common.Quote(string(ExecutionCreate)))},
{Raw: []byte(common.Quote(string(ExecutionStart)))},
{Raw: []byte(common.Quote(string(ExecutionStop)))},
},
},
"retryPolicy": {
Type: "object",
Properties: map[string]apiExtensions.JSONSchemaProps{
"maxRetryCount": {
Type: "integer",
Minimum: common.PtrFloat64(ExtendedUnlimitedValue),
},
"fancyRetryPolicy": {
Type: "boolean",
Nullable: true,
},
},
},
"taskRoles": {
// TODO: names in array should not duplicate
Type: "array",
Items: &apiExtensions.JSONSchemaPropsOrArray{
Schema: &apiExtensions.JSONSchemaProps{
Type: "object",
Properties: map[string]apiExtensions.JSONSchemaProps{
"name": {
Type: "string",
Expand All @@ -103,6 +120,7 @@ func buildFrameworkValidation() *apiExtensions.CustomResourceValidation {
Maximum: common.PtrFloat64(10000),
},
"frameworkAttemptCompletionPolicy": {
Type: "object",
Properties: map[string]apiExtensions.JSONSchemaProps{
"minFailedTaskCount": {
Type: "integer",
Expand All @@ -116,12 +134,43 @@ func buildFrameworkValidation() *apiExtensions.CustomResourceValidation {
},
},
},
"task": {
Type: "object",
Properties: map[string]apiExtensions.JSONSchemaProps{
"retryPolicy": {
Nullable: true,
Type: "object",
Properties: map[string]apiExtensions.JSONSchemaProps{
"maxRetryCount": {
Type: "integer",
Minimum: common.PtrFloat64(ExtendedUnlimitedValue),
},
"fancyRetryPolicy": {
Type: "boolean",
},
},
},
"podGracefulDeletionTimeoutSec": {
Nullable: true,
Type: "integer",
},
"pod": {
Type: "object",
XPreserveUnknownFields: common.PtrBool(true),
},
},
},
},
},
},
},
},
},
"status": {
Type: "object",
Nullable: true,
XPreserveUnknownFields: common.PtrBool(true),
},
},
},
}
Expand Down
5 changes: 3 additions & 2 deletions pkg/apis/frameworkcontroller/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading