Skip to content

Commit

Permalink
Upgrade client-go to v0.29.3, update misc dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Mar 25, 2024
1 parent 702d9e0 commit 0347788
Show file tree
Hide file tree
Showing 68 changed files with 2,881 additions and 1,156 deletions.
52 changes: 26 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,37 @@ require (
github.com/gorilla/mux v1.8.1
github.com/openfaas/faas-provider v0.25.3
github.com/pkg/errors v0.9.1
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
k8s.io/code-generator v0.29.2
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
k8s.io/code-generator v0.29.3
k8s.io/klog v1.0.0
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
)

require github.com/google/go-containerregistry v0.19.0
require github.com/google/go-containerregistry v0.19.1

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v25.0.3+incompatible // indirect
github.com/docker/cli v26.0.0+incompatible // indirect
github.com/docker/distribution v2.8.3+incompatible // indirect
github.com/docker/docker v25.0.3+incompatible // indirect
github.com/docker/docker v26.0.0+incompatible // indirect
github.com/docker/docker-credential-helpers v0.8.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.9 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.7 // indirect
Expand All @@ -48,31 +48,31 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.47.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/prometheus/common v0.51.1 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/vbatts/tar-split v0.11.5 // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.18.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.32.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/gengo v0.0.0-20240129211411-f967bbeff4b4 // indirect
k8s.io/gengo v0.0.0-20240310015720-9cff6334dab4 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240221221325-2ac9dc51f3f1 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
53 changes: 53 additions & 0 deletions go.sum

Large diffs are not rendered by default.

20 changes: 1 addition & 19 deletions pkg/handlers/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ func makeDeploymentSpec(request types.FunctionDeployment, existingSecrets map[st
}
}

nodeSelector := createSelector(request.Constraints)

resources, err := createResources(request)

if err != nil {
Expand Down Expand Up @@ -200,7 +198,7 @@ func makeDeploymentSpec(request types.FunctionDeployment, existingSecrets map[st
Annotations: annotations,
},
Spec: corev1.PodSpec{
NodeSelector: nodeSelector,
NodeSelector: map[string]string{},
Containers: []corev1.Container{
{
Name: request.Service,
Expand Down Expand Up @@ -330,22 +328,6 @@ func int32p(i int32) *int32 {
return &i
}

func createSelector(constraints []string) map[string]string {
selector := make(map[string]string)

if len(constraints) > 0 {
for _, constraint := range constraints {
parts := strings.Split(constraint, "=")

if len(parts) == 2 {
selector[parts[0]] = parts[1]
}
}
}

return selector
}

func createResources(request types.FunctionDeployment) (*corev1.ResourceRequirements, error) {
resources := &corev1.ResourceRequirements{
Limits: corev1.ResourceList{},
Expand Down
3 changes: 1 addition & 2 deletions pkg/handlers/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ func updateDeploymentSpec(

factory.ConfigureReadOnlyRootFilesystem(request, deployment)
factory.ConfigureContainerUserID(deployment)

deployment.Spec.Template.Spec.NodeSelector = createSelector(request.Constraints)
deployment.Spec.Template.Spec.NodeSelector = map[string]string{}

labels := map[string]string{
"faas_function": request.Service,
Expand Down
16 changes: 0 additions & 16 deletions vendor/github.com/docker/docker/pkg/homedir/homedir.go

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

8 changes: 0 additions & 8 deletions vendor/github.com/docker/docker/pkg/homedir/homedir_unix.go

This file was deleted.

This file was deleted.

12 changes: 12 additions & 0 deletions vendor/github.com/emicklei/go-restful/v3/CHANGES.md

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

1 change: 0 additions & 1 deletion vendor/github.com/emicklei/go-restful/v3/README.md

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

10 changes: 10 additions & 0 deletions vendor/github.com/emicklei/go-restful/v3/compress.go

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

2 changes: 1 addition & 1 deletion vendor/github.com/emicklei/go-restful/v3/jsr311.go

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

2 changes: 1 addition & 1 deletion vendor/github.com/go-openapi/jsonpointer/pointer.go

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

2 changes: 1 addition & 1 deletion vendor/github.com/go-openapi/swag/initialism_index.go

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

14 changes: 0 additions & 14 deletions vendor/github.com/go-openapi/swag/string_bytes.go

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

3 changes: 2 additions & 1 deletion vendor/github.com/go-openapi/swag/yaml.go

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

12 changes: 12 additions & 0 deletions vendor/github.com/imdario/mergo/.deepsource.toml

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

5 changes: 5 additions & 0 deletions vendor/github.com/imdario/mergo/.travis.yml

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

Loading

0 comments on commit 0347788

Please sign in to comment.