Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update backend and controller dependencies #818

Merged
merged 6 commits into from
May 9, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '15 10 * * 3'
- cron: "15 10 * * 3"

jobs:
analyze:
Expand All @@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'go', 'javascript' ]
language: ["go", "javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
16 changes: 9 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
Expand All @@ -33,14 +33,16 @@ jobs:
- update-source
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/checkout@v4
with:
go-version: "1.20"
go-version-file: go.mod
- run: go version

- name: Create tag
run: |
git tag v${{ inputs.version }}
Expand Down Expand Up @@ -75,7 +77,7 @@ jobs:
- create-release
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
Expand Down Expand Up @@ -105,7 +107,7 @@ jobs:
- create-release
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
Expand Down Expand Up @@ -135,7 +137,7 @@ jobs:
- create-release
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: main
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ endif
.PHONY: test-all-k8s-versions
test-all-k8s-versions: go manifests generate fmt vet envtest ## Run tests on targeting k8s versions.
ifeq ($(QUICK_BUILD),no)
-KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use 1.26.x -p path)" $(GO) test ./... -coverprofile $(COVER_PROFILE)
-KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use 1.25.x -p path)" $(GO) test ./... -coverprofile $(COVER_PROFILE)
-KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use 1.24.x -p path)" $(GO) test ./... -coverprofile $(COVER_PROFILE)
-KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use 1.30.x -p path)" $(GO) test ./... -coverprofile $(COVER_PROFILE)
-KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use 1.29.x -p path)" $(GO) test ./... -coverprofile $(COVER_PROFILE)
-KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use 1.28.x -p path)" $(GO) test ./... -coverprofile $(COVER_PROFILE)
endif

.PHONY: clear-snapshots-ui
Expand Down Expand Up @@ -266,12 +266,12 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
##---------------------------------------------------------------------

## Tool Versions
GO_VERSION ?= 1.20.4
KUSTOMIZE_VERSION ?= v5.0.1
CONTROLLER_TOOLS_VERSION ?= v0.12.0
GO_VERSION ?= 1.22.3
KUSTOMIZE_VERSION ?= v5.4.1
CONTROLLER_TOOLS_VERSION ?= v0.15.0

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION ?= 1.26.x
ENVTEST_K8S_VERSION ?= 1.30.x

## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
Expand Down
22 changes: 11 additions & 11 deletions api/v1alpha1/workspace_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
)

func TestNetworkRule_Default(t *testing.T) {
Expand Down Expand Up @@ -43,15 +43,15 @@ func TestNetworkRule_Default(t *testing.T) {
Protocol: "http",
PortNumber: 1111,
HTTPPath: "/path",
TargetPortNumber: pointer.Int32(0),
TargetPortNumber: ptr.To(int32(0)),
Public: false,
},
want: NetworkRule{
CustomHostPrefix: "name",
Protocol: "http",
PortNumber: 1111,
HTTPPath: "/path",
TargetPortNumber: pointer.Int32(0),
TargetPortNumber: ptr.To(int32(0)),
Public: false,
},
},
Expand All @@ -62,15 +62,15 @@ func TestNetworkRule_Default(t *testing.T) {
Protocol: "http",
PortNumber: 1111,
HTTPPath: "/path",
TargetPortNumber: pointer.Int32(2222),
TargetPortNumber: ptr.To(int32(2222)),
Public: true,
},
want: NetworkRule{
CustomHostPrefix: "name",
Protocol: "http",
PortNumber: 1111,
HTTPPath: "/path",
TargetPortNumber: pointer.Int32(2222),
TargetPortNumber: ptr.To(int32(2222)),
Public: true,
},
},
Expand All @@ -81,15 +81,15 @@ func TestNetworkRule_Default(t *testing.T) {
Protocol: "http",
PortNumber: 1111,
HTTPPath: "",
TargetPortNumber: pointer.Int32(2222),
TargetPortNumber: ptr.To(int32(2222)),
Public: false,
},
want: NetworkRule{
CustomHostPrefix: "name",
Protocol: "http",
PortNumber: 1111,
HTTPPath: "/",
TargetPortNumber: pointer.Int32(2222),
TargetPortNumber: ptr.To(int32(2222)),
Public: false,
},
},
Expand All @@ -100,15 +100,15 @@ func TestNetworkRule_Default(t *testing.T) {
Protocol: "",
PortNumber: 1111,
HTTPPath: "path",
TargetPortNumber: pointer.Int32(2222),
TargetPortNumber: ptr.To(int32(2222)),
Public: false,
},
want: NetworkRule{
CustomHostPrefix: "port1111",
Protocol: "http",
PortNumber: 1111,
HTTPPath: "path",
TargetPortNumber: pointer.Int32(2222),
TargetPortNumber: ptr.To(int32(2222)),
Public: false,
},
},
Expand All @@ -135,7 +135,7 @@ func TestNetworkRule_portName(t *testing.T) {
name: "✅ OK",
netRule: &NetworkRule{
PortNumber: 1111,
TargetPortNumber: pointer.Int32(2222),
TargetPortNumber: ptr.To(int32(2222)),
},
want: "port1111",
},
Expand All @@ -161,7 +161,7 @@ func TestNetworkRule_ServicePort(t *testing.T) {
CustomHostPrefix: "name",
PortNumber: 1111,
HTTPPath: "/path",
TargetPortNumber: pointer.Int32(2222),
TargetPortNumber: ptr.To(int32(2222)),
},
want: corev1.ServicePort{
Name: "port1111",
Expand Down
1 change: 0 additions & 1 deletion api/v1alpha1/zz_generated.deepcopy.go

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

4 changes: 2 additions & 2 deletions charts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ helm-dependency-update:
cd cosmo; ../$(HELM) dependency update

chartsnap:
go install github.com/cosmo-workspace/controller-testtools/cmd/chartsnap@latest
-helm plugin install https://github.com/jlandowner/helm-chartsnap

TEST_VALUES ?= cosmo/test

test: chartsnap helm helm-dependency-update
chartsnap --chart cosmo --values $(TEST_VALUES) --helm-path $(HELM) $(CHARTSNAP_OPT)
helm chartsnap -c cosmo --values $(TEST_VALUES) -n cosmo-system $(CHARTSNAP_OPT)

test-list:
grep -R '{{[-|] if .*}}' cosmo/templates/* | grep .Values | awk -F':' '{print $$2}' | sed -n 's/.*\(.Values[^ ]*\).*/\1/p' | tr -d ')' | sort | uniq | awk -F'.Values.' '{print $$2}' > cosmo/test/if-values.list
Expand Down
6 changes: 3 additions & 3 deletions charts/cosmo/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: traefik
repository: https://traefik.github.io/charts
version: 23.0.1
digest: sha256:42e94181cdffc906bcfbb56c2833ac7a1a2c9919437ea200cb141d2c7b6a2b38
generated: "2023-07-03T16:53:58.777276317+09:00"
version: 28.0.0
digest: sha256:22326d90a5d813d9486df54e7e909154b9960fd129a826b29b6cc2197e0f85e0
generated: "2024-05-09T15:40:19.505948468+09:00"
2 changes: 1 addition & 1 deletion charts/cosmo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ maintainers:
email: [email protected]
dependencies:
- name: traefik
version: "23.0.1"
version: "28.0.0"
repository: https://traefik.github.io/charts
condition: traefik.enabled
keywords:
Expand Down
Loading
Loading