Skip to content

Commit

Permalink
update deps, go, and ci deps (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudermanjr committed May 26, 2023
1 parent 4ce6376 commit c300d5e
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 216 deletions.
31 changes: 18 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
rok8s: fairwinds/rok8s-scripts@11
rok8s: fairwinds/rok8s-scripts@12
oss-docs: fairwinds/oss-docs@0

references:
Expand All @@ -11,13 +11,14 @@ references:
command: |
apk --update add curl yq
cd /tmp
curl -LO https://releases.hashicorp.com/vault/1.9.2/vault_1.9.2_linux_amd64.zip
unzip vault_1.9.2_linux_amd64.zip
curl -LO https://releases.hashicorp.com/vault/1.13.2/vault_1.13.2_linux_amd64.zip
sha256sum vault_1.13.2_linux_amd64.zip | grep f7930279de8381de7c532164b4a4408895d9606c0d24e2e9d2f9acb5dfe99b3c
unzip vault_1.13.2_linux_amd64.zip
mv vault /usr/bin/vault
e2e_configuration: &e2e_configuration
pre_script: e2e/pre.sh
script: e2e/run.sh
command_runner_image: quay.io/reactiveops/ci-images:v11-stretch
command_runner_image: quay.io/reactiveops/ci-images:v12-buster
enable_docker_layer_caching: true
store-test-results: /tmp/test-results
attach-workspace: true
Expand All @@ -34,7 +35,7 @@ jobs:
test:
working_directory: /home/circleci/go/src/github.com/fairwindsops/goldilocks
docker:
- image: cimg/go:1.19
- image: cimg/go:1.20
environment:
GL_DEBUG: linters_output
GOPACKAGESPRINTGOLISTERRORS: "1"
Expand All @@ -43,8 +44,8 @@ jobs:
- run:
name: golangci-lint
environment:
GOLANGCI_LINT_VERSION: 1.50.1
GOLANGCI_LINT_CHECKSUM: 4ba1dc9dbdf05b7bdc6f0e04bdfe6f63aa70576f51817be1b2540bbce017b69a
GOLANGCI_LINT_VERSION: 1.52.2
GOLANGCI_LINT_CHECKSUM: c9cf72d12058a131746edd409ed94ccd578fbd178899d1ed41ceae3ce5f54501
command: |
curl -OL https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_LINT_VERSION}/golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz
[[ "$(sha256sum golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz)" == "${GOLANGCI_LINT_CHECKSUM} golangci-lint-${GOLANGCI_LINT_VERSION}-linux-amd64.tar.gz" ]]
Expand All @@ -60,7 +61,7 @@ jobs:
resource_class: large
shell: /bin/bash
docker:
- image: goreleaser/goreleaser:v1.11.4
- image: goreleaser/goreleaser:v1.18.2
steps:
- checkout
- setup_remote_docker
Expand All @@ -77,7 +78,7 @@ jobs:
working_directory: /go/src/github.com/fairwindsops/goldilocks
resource_class: large
docker:
- image: goreleaser/goreleaser:v1.12.3
- image: goreleaser/goreleaser:v1.18.2
steps:
- checkout
- setup_remote_docker
Expand All @@ -102,12 +103,16 @@ workflows:
requires:
- test
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.20.2"
kind_node_image: "kindest/node:v1.20.2@sha256:15d3b5c4f521a84896ed1ead1b14e4774d02202d5c65ab68f30eeaf310a3b1a7"
name: "End-To-End Kubernetes 1.23"
kind_node_image: "kindest/node:v1.23.13@sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61"
<<: *e2e_configuration
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.21.1"
kind_node_image: "kindest/node:v1.21.2@sha256:9d07ff05e4afefbba983fac311807b3c17a5f36e7061f6cb7e2ba756255b2be4"
name: "End-To-End Kubernetes 1.24"
kind_node_image: "kindest/node:v1.24.7@sha256:577c630ce8e509131eab1aea12c022190978dd2f745aac5eb1fe65c0807eb315"
<<: *e2e_configuration
- rok8s/kubernetes_e2e_tests:
name: "End-To-End Kubernetes 1.25"
kind_node_image: "kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1"
<<: *e2e_configuration
release:
jobs:
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.18

LABEL org.opencontainers.image.authors="FairwindsOps, Inc." \
org.opencontainers.image.vendor="FairwindsOps, Inc." \
Expand All @@ -8,9 +8,7 @@ LABEL org.opencontainers.image.authors="FairwindsOps, Inc." \
org.opencontainers.image.source="https://github.com/FairwindsOps/goldilocks" \
org.opencontainers.image.url="https://github.com/FairwindsOps/goldilocks" \
org.opencontainers.image.licenses="Apache License 2.0"

# 'nobody' user in alpine
USER 65534
COPY goldilocks /

CMD ["/goldilocks"]
4 changes: 2 additions & 2 deletions e2e/tests/00_setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ testcases:
- name: Install metrics-server
steps:
- script: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server
helm repo update
helm -n metrics-server upgrade --install metrics-server bitnami/metrics-server --set apiService.create=true --set extraArgs[0]='--kubelet-insecure-tls=true' --create-namespace
helm upgrade --install metrics-server metrics-server/metrics-server -n metrics-server --create-namespace --set=args={'--kubelet-insecure-tls'}
- name: Install VPA Recommender
steps:
- script: |
Expand Down
9 changes: 5 additions & 4 deletions e2e/tests/10_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ testcases:
- name: Setup demo namespace
steps:
- script: |
kubectl create ns demo
helm repo add fairwinds-incubator https://charts.fairwinds.com/incubator
helm install basic-demo fairwinds-incubator/basic-demo --namespace demo --version=0.4.0
helm install basic-demo fairwinds-incubator/basic-demo --namespace demo --create-namespace
kubectl -n demo wait deployment --timeout={{.timeout}} --for condition=available -l app.kubernetes.io/name=basic-demo
- name: No VPA Anywhere Before Labels
steps:
Expand All @@ -29,8 +28,10 @@ testcases:
- name: Setup redis in statefulset-demo namespace
steps:
- script: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
kubectl create ns statefulset-demo
helm install redis bitnami/redis --namespace statefulset-demo --version=16.12.1 --set architecture=replication
helm install redis bitnami/redis --namespace statefulset-demo --set architecture=replication
- name: No VPA in statefulset-demo namespace Before Labels
steps:
- script: kubectl get vpa -n statefulset-demo
Expand All @@ -51,7 +52,7 @@ testcases:
- script: |
kubectl create ns demo-resource-policy
helm repo add fairwinds-incubator https://charts.fairwinds.com/incubator
helm install basic-demo fairwinds-incubator/basic-demo --namespace demo-resource-policy --version=0.4.0
helm install basic-demo fairwinds-incubator/basic-demo --namespace demo-resource-policy
kubectl -n demo-resource-policy wait deployment --timeout={{.timeout}} --for condition=available -l app.kubernetes.io/name=basic-demo
- name: VPA with Resource Policy in demo-resource-policy namespace
steps:
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/20_flags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ testcases:
kubectl create ns demo-excluded
helm repo add fairwinds-incubator https://charts.fairwinds.com/incubator
helm install basic-demo-no-label fairwinds-incubator/basic-demo --namespace demo-no-label --version=0.4.0
helm install basic-demo-included fairwinds-incubator/basic-demo --namespace demo-included --version=0.4.0
helm install basic-demo-excluded fairwinds-incubator/basic-demo --namespace demo-excluded --version=0.4.0
helm install basic-demo-no-label fairwinds-incubator/basic-demo --namespace demo-no-label
helm install basic-demo-included fairwinds-incubator/basic-demo --namespace demo-included
helm install basic-demo-excluded fairwinds-incubator/basic-demo --namespace demo-excluded
kubectl -n demo-no-label wait deployment --timeout={{.timeout}} --for condition=available -l app.kubernetes.io/name=basic-demo
kubectl -n demo-included wait deployment --timeout={{.timeout}} --for condition=available -l app.kubernetes.io/name=basic-demo
Expand Down
43 changes: 16 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
module github.com/fairwindsops/goldilocks

go 1.19
go 1.20

require (
github.com/davecgh/go-spew v1.1.1
github.com/fairwindsops/controller-utils v0.3.1
github.com/gobuffalo/packr/v2 v2.8.3
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/spf13/cobra v1.6.1
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.1
k8s.io/api v0.26.3
k8s.io/apimachinery v0.26.3
github.com/stretchr/testify v1.8.2
k8s.io/api v0.27.2
k8s.io/apimachinery v0.27.2
k8s.io/autoscaler/vertical-pod-autoscaler v0.13.0
k8s.io/client-go v0.26.3
k8s.io/klog/v2 v2.90.1
sigs.k8s.io/controller-runtime v0.14.6
k8s.io/client-go v0.27.2
k8s.io/klog/v2 v2.100.1
sigs.k8s.io/controller-runtime v0.15.0
)

require (
cloud.google.com/go/compute v1.14.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/go-logr/logr v1.2.4 // indirect
Expand All @@ -38,7 +30,6 @@ require (
github.com/gobuffalo/logger v1.0.7 // indirect
github.com/gobuffalo/packd v1.0.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.4.3 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/go-cmp v0.5.9 // indirect
Expand All @@ -57,22 +48,20 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
golang.org/x/crypto v0.6.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
github.com/sirupsen/logrus v1.9.2 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.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/kube-openapi v0.0.0-20230327201221-f5883ff37f0c // indirect
k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 // indirect
k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
Expand Down
Loading

0 comments on commit c300d5e

Please sign in to comment.