Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pluralsh/kubernetes-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Oct 23, 2023
2 parents d6f7582 + e6ef777 commit e5ed3ca
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 305 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
go-version-file: go.mod
check-latest: true
- run: TARGET_DIRECTORY=. make build-kas
- run: PATH=$PATH:$GOPATH/bin TARGET_DIRECTORY=. make build-kas
build-agentk:
name: Build agentk
runs-on: ubuntu-latest
Expand All @@ -29,7 +29,27 @@ jobs:
with:
go-version-file: go.mod
check-latest: true
- run: TARGET_DIRECTORY=. make build-agentk
- run: PATH=$PATH:$GOPATH/bin TARGET_DIRECTORY=. make build-agentk
image-kas:
name: Build kas image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- run: PATH=$PATH:$GOPATH/bin TARGET_DIRECTORY=. make docker-kas
image-agentk:
name: Build agentk image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- run: PATH=$PATH:$GOPATH/bin TARGET_DIRECTORY=. make docker-agentk
test:
name: Unit test
runs-on: ubuntu-latest
Expand All @@ -39,7 +59,7 @@ jobs:
with:
go-version-file: go.mod
check-latest: true
- run: make test
- run: PATH=$PATH:$GOPATH/bin make test
lint:
name: Lint
runs-on: ubuntu-latest
Expand Down
258 changes: 0 additions & 258 deletions .gitlab/.gitlab-ci.yml

This file was deleted.

42 changes: 0 additions & 42 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,45 +132,3 @@ lint: $(PRE) ## run linters
.PHONY: fix
fix: $(PRE) ## fix issues found by linters
golangci-lint run --fix ./...

################################ Old definitions

# Build and push all FIPS docker images tagged with the tag on the current commit and as "stable".
# This only works on a linux machine
# Set ARCH to the desired CPU architecture.
# Set CI_REGISTRY_IMAGE to the desired container image name.
# Set BUILDER_IMAGE to the image to be used for building the agentk binary.
.PHONY: release-tag-and-stable-fips
release-tag-and-stable-fips:
docker buildx build --build-arg 'BUILDER_IMAGE=$(BUILDER_IMAGE)' --platform 'linux/$(ARCH)' --file build/agentk.ubi8-fips.Dockerfile --tag '$(FIPS_TAG_GIT_ARCH)' --tag '$(FIPS_TAG_STABLE_ARCH)' .
docker push '$(FIPS_TAG_GIT_ARCH)'
docker push '$(FIPS_TAG_STABLE_ARCH)'

.PHONY: release-tag-and-stable-fips-manifest
release-tag-and-stable-fips-manifest:
docker manifest create '$(FIPS_TAG_GIT)' \
--amend '$(FIPS_TAG_GIT)-amd64' \
--amend '$(FIPS_TAG_GIT)-arm64'
docker manifest push '$(FIPS_TAG_GIT)'
docker manifest create '$(FIPS_TAG_STABLE)' \
--amend '$(FIPS_TAG_STABLE)-amd64' \
--amend '$(FIPS_TAG_STABLE)-arm64'
docker manifest push '$(FIPS_TAG_STABLE)'

# Build and push all FIPS docker images tagged with the tag on the current commit.
# This only works on a linux machine
# Set ARCH to the desired CPU architecture.
# Set CI_REGISTRY_IMAGE to the desired container image name.
# Set BUILDER_IMAGE to the image to be used for building the agentk binary.
.PHONY: release-tag-fips
release-tag-fips:
docker buildx build --build-arg 'BUILDER_IMAGE=$(BUILDER_IMAGE)' --platform 'linux/$(ARCH)' --file build/agentk.ubi8-fips.Dockerfile --tag '$(FIPS_TAG_GIT_ARCH)' .
docker push '$(FIPS_TAG_GIT_ARCH)'

.PHONY: release-tag-fips-manifest
release-tag-fips-manifest:
docker manifest create '$(FIPS_TAG_GIT)' \
--amend '$(FIPS_TAG_GIT)-amd64' \
--amend '$(FIPS_TAG_GIT)-arm64'
docker manifest push '$(FIPS_TAG_GIT)'

4 changes: 2 additions & 2 deletions cmd/kas/kasapp/configured_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/ash2k/stager"
"github.com/getsentry/sentry-go"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus"
"github.com/pluralsh/kuberentes-agent/cmd/kas/kasapp/plural"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/redis/rueidis"
Expand All @@ -36,7 +37,6 @@ import (
_ "google.golang.org/grpc/encoding/gzip" // Install the gzip compressor

"github.com/pluralsh/kuberentes-agent/cmd"
"github.com/pluralsh/kuberentes-agent/cmd/kas/kasapp/fake"
"github.com/pluralsh/kuberentes-agent/internal/api"
gapi "github.com/pluralsh/kuberentes-agent/internal/gitlab/api"
agent_registrar_server "github.com/pluralsh/kuberentes-agent/internal/module/agent_registrar/server"
Expand Down Expand Up @@ -310,7 +310,7 @@ func (a *ConfiguredApp) constructFakeRpcApiFactory(errRep errz.ErrReporter, sent
log: a.Log,
sentryHub: sentryHub,
}
fAgent := fake.ServerAgentRpcApiFactory{
fAgent := plural.ServerAgentRpcApiFactory{
RPCApiFactory: f.New,
AgentInfoCache: cache.NewWithError[api.AgentToken, *api.AgentInfo](
aCfg.InfoCacheTtl.AsDuration(),
Expand Down
Loading

0 comments on commit e5ed3ca

Please sign in to comment.