Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into remove-toolchainc…
Browse files Browse the repository at this point in the history
…onfig-capacity-thresholds

# Conflicts:
#	go.sum
  • Loading branch information
metlos committed Apr 8, 2024
2 parents 9f7db35 + 4d53fb0 commit c8f6990
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 51 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci-golang-sbom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: ci-build
on:
push:
branches:
- master
tags-ignore:
- '*.*'
pull_request:
branches:
- master

jobs:
golangci:
name: GolangCI Lint
runs-on: ubuntu-20.04
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4

- name: generate
run: |
make generate
- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.52.0
skip-pkg-cache: true
skip-build-cache: true
args: --config=./.golangci.yml --verbose

sbom:
name: Generate SBOM
runs-on: ubuntu-20.04
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4

- name: Generate SBOM
uses: CycloneDX/gh-gomod-generate-sbom@v2
with:
version: v1
args: mod -licenses -json -output -
2 changes: 1 addition & 1 deletion .github/workflows/publish-operators-for-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
# Is executed only for comment events - in that case the pull_request field is empty
- name: Send Github API Request to get PR data
id: request
uses: octokit/request-action@v2.2.0
uses: octokit/request-action@v2.3.0
if: ${{ github.event.pull_request == '' }}
with:
route: ${{ github.event.issue.pull_request.url }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,45 +43,3 @@ jobs:
flags: unittests # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)

golangci:
name: GolangCI Lint
runs-on: ubuntu-20.04
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4

- name: generate
run: |
make generate
- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.52.0
skip-pkg-cache: true
skip-build-cache: true
args: --config=./.golangci.yml --verbose

sbom:
name: Generate SBOM
runs-on: ubuntu-20.04
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x

- name: Checkout code
uses: actions/checkout@v4

- name: Generate SBOM
uses: CycloneDX/gh-gomod-generate-sbom@v2
with:
version: v1
args: mod -licenses -json -output -
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ module github.com/codeready-toolchain/host-operator

replace (
github.com/codeready-toolchain/api => github.com/metlos/api v0.0.0-20240326131121-9509925cdd79
github.com/codeready-toolchain/toolchain-common => github.com/metlos/toolchain-common v0.0.0-20240326141456-07cbb3679832
github.com/codeready-toolchain/toolchain-common => github.com/metlos/toolchain-common v0.0.0-20240408103238-edb68ec6cfa8
)

require (
github.com/codeready-toolchain/api v0.0.0-20240322110702-5ab3840476e9
github.com/codeready-toolchain/toolchain-common v0.0.0-20240322131000-8d44f7428e83
github.com/codeready-toolchain/toolchain-common v0.0.0-20240404090512-046d250d7d78
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-bindata/go-bindata v3.1.2+incompatible
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/metlos/api v0.0.0-20240326131121-9509925cdd79 h1:CK470udH8w1HRieGKequ1kw1iMCugAAWKyRUFV/58WE=
github.com/metlos/api v0.0.0-20240326131121-9509925cdd79/go.mod h1:cfNN6YPX4TORvhhZXMSjSPesqAHlB3nD/WAfGe4WLKQ=
github.com/metlos/toolchain-common v0.0.0-20240326141456-07cbb3679832 h1:fzUMkCN3hJcDkuJQfDEtzCo4TZQS7UupbudX6uDT6V8=
github.com/metlos/toolchain-common v0.0.0-20240326141456-07cbb3679832/go.mod h1:YciFg9BSk48nYeoc/xVHRZ0T0lT+cS5OwTrMHdeyArA=
github.com/metlos/toolchain-common v0.0.0-20240408103238-edb68ec6cfa8 h1:IJDBYEM7vpw/VpRyMhGMrjaPEljyemBHOUUHVmaY/us=
github.com/metlos/toolchain-common v0.0.0-20240408103238-edb68ec6cfa8/go.mod h1:YciFg9BSk48nYeoc/xVHRZ0T0lT+cS5OwTrMHdeyArA=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/migueleliasweb/go-github-mock v0.0.18 h1:0lWt9MYmZQGnQE2rFtjlft/YtD6hzxuN6JJRFpujzEI=
github.com/migueleliasweb/go-github-mock v0.0.18/go.mod h1:CcgXcbMoRnf3rRVHqGssuBquZDIcaplxL2W6G+xs7kM=
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/codeready-toolchain/host-operator/pkg/templates/nstemplatetiers"
"github.com/codeready-toolchain/host-operator/pkg/templates/usertiers"
"github.com/codeready-toolchain/host-operator/version"
"github.com/codeready-toolchain/toolchain-common/controllers/toolchaincluster"
"github.com/codeready-toolchain/toolchain-common/controllers/toolchainclustercache"
commonclient "github.com/codeready-toolchain/toolchain-common/pkg/client"
commoncluster "github.com/codeready-toolchain/toolchain-common/pkg/cluster"
commonconfig "github.com/codeready-toolchain/toolchain-common/pkg/configuration"
Expand Down Expand Up @@ -215,12 +215,12 @@ func main() { // nolint:gocyclo
}

// Setup all Controllers
if err = toolchaincluster.NewReconciler(
if err = toolchainclustercache.NewReconciler(
mgr,
namespace,
memberClientTimeout,
).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "ToolchainCluster")
setupLog.Error(err, "unable to create controller", "controller", "ToolchainClusterCache")
os.Exit(1)
}
if err := (&deactivation.Reconciler{
Expand Down Expand Up @@ -382,7 +382,7 @@ func main() { // nolint:gocyclo
}

setupLog.Info("Starting ToolchainCluster health checks.")
toolchaincluster.StartHealthChecks(ctx, mgr, namespace, 10*time.Second)
toolchainclustercache.StartHealthChecks(ctx, mgr, namespace, 10*time.Second)

// create or update Toolchain status during the operator deployment
setupLog.Info("Creating/updating the ToolchainStatus resource")
Expand Down

0 comments on commit c8f6990

Please sign in to comment.