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

sync: rc-2023-11-16.1 to stage #1474

Merged
merged 20 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4d07b74
Fix SCC (#1451)
ludydoo Nov 7, 2023
0a4399f
ROX-20694: Use app-interface image tag pattern for all the images (#1…
kovayur Nov 8, 2023
e7f40a1
Fix deploy to integration (#1453)
kovayur Nov 9, 2023
cf41d96
disable OpenShift monitoring for internal Centrals (#1447)
stehessel Nov 9, 2023
54262f9
Bump sigs.k8s.io/yaml from 1.3.0 to 1.4.0 (#1437)
dependabot[bot] Nov 10, 2023
4a0add6
ROX-20594: Introduce the helm operator for the Addon deployment (#1428)
kovayur Nov 10, 2023
fcd08ff
ROX-2063: change operator deployment to enable heap profiling (#1459)
johannes94 Nov 13, 2023
676738f
ROX-16643 Move infra-workloads to dedicated node pools (#1460)
ludydoo Nov 13, 2023
fc5340d
ROX-16643 Fix manifests (#1463)
ludydoo Nov 13, 2023
bc7c229
Add pprof server to fleet-manager and unlimited evals in testing&deve…
SimonBaeumer Nov 13, 2023
039b884
Bump helm.sh/helm/v3 from 3.13.1 to 3.13.2 (#1456)
dependabot[bot] Nov 14, 2023
d1a0d59
ROX-20795: probe telemetry configuration (#1455)
parametalol Nov 14, 2023
df440f7
Bump golang.org/x/sync from 0.4.0 to 0.5.0 (#1438)
dependabot[bot] Nov 15, 2023
9a688e5
Increase prom memory on prod (#1467)
ludydoo Nov 15, 2023
a424f0a
Switch egress-proxy to a floating tag (#1465)
rukletsov Nov 15, 2023
5a5383b
Bump github.com/onsi/ginkgo/v2 from 2.13.0 to 2.13.1 in /tools (#1461)
dependabot[bot] Nov 15, 2023
e5e6eec
Bump golang.org/x/sys from 0.13.0 to 0.14.0 (#1436)
dependabot[bot] Nov 15, 2023
42d23ae
ROX-20740: Disable local scanner on dogfood (#1469)
ludydoo Nov 15, 2023
c4533f3
Bump github.com/go-logr/logr from 1.2.4 to 1.3.0 (#1423)
dependabot[bot] Nov 15, 2023
df7cd1b
Bump github.com/prometheus/common from 0.44.0 to 0.45.0 (#1422)
dependabot[bot] Nov 15, 2023
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
4 changes: 4 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ updates:
directory: "/probe"
schedule:
interval: "weekly"
- package-ecosystem: "docker"
directory: "/dp-terraform/helm"
schedule:
interval: "weekly"
102 changes: 62 additions & 40 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# This runs checks to verify if code is properly formatted and that tests (unit and integration against a mocked environment) are passing.
name: Verify & Test
name: CI

on:
push:
Expand Down Expand Up @@ -34,32 +33,46 @@ on:
- 'pkg/api/openapi/docs/**'
- 'pkg/api/openapi/.openapi-generator-ignore'

# TODO make sure that the secrets are configured for your repository
env:
# set ocm env to integration
OCM_ENV: integration
# Dummy SSO variables
SSO_CLIENT_ID: ${{ secrets.SSO_CLIENT_ID }}
SSO_CLIENT_SECRET: ${{ secrets.SSO_CLIENT_SECRET }}
OSD_IDP_SSO_CLIENT_ID: ${{ secrets.OSD_IDP_SSO_CLIENT_ID }}
OSD_IDP_SSO_CLIENT_SECRET: ${{ secrets.OSD_IDP_SSO_CLIENT_SECRET }}
# Dummy AWS credentials
AWS_ACCOUNT_ID: aws_accountid
AWS_ACCESS_KEY: aws_accesskey
AWS_SECRET_ACCESS_KEY: aws_secretaccesskey # pragma: allowlist secret - dummy value
ROUTE53_ACCESS_KEY: aws_route53_access_key # pragma: allowlist secret - dummy value
ROUTE53_SECRET_ACCESS_KEY: aws_route53_secret_access_key # pragma: allowlist secret - dummy value
# Dummy Central TLS env variables
CENTRAL_TLS_CERT: central_tls_cert # pragma: allowlist secret - dummy value
CENTRAL_TLS_KEY: central_tls_key # pragma: allowlist secret - dummy value
# So that OCM secrets are initialised
DOCKER_PR_CHECK: true
TEST_TIMEOUT: 30m

jobs:
# This runs all pre-commit hooks defined within .pre-commit-config.yaml.
pre-commit:
name: "Run pre-commit hooks"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- uses: actions/setup-go@v3
with:
go-version: "1.20"
- uses: pre-commit/[email protected]
- uses: pre-commit/[email protected]
name: Verify generated files are up-to-date
with:
extra_args: --hook-stage=manual --all-files

verify-test:
name: "Verify & Test"
runs-on: ubuntu-latest
env:
# TODO make sure that the secrets are configured for your repository
OCM_ENV: integration
# Dummy SSO variables
SSO_CLIENT_ID: ${{ secrets.SSO_CLIENT_ID }}
SSO_CLIENT_SECRET: ${{ secrets.SSO_CLIENT_SECRET }}
OSD_IDP_SSO_CLIENT_ID: ${{ secrets.OSD_IDP_SSO_CLIENT_ID }}
OSD_IDP_SSO_CLIENT_SECRET: ${{ secrets.OSD_IDP_SSO_CLIENT_SECRET }}
# Dummy AWS credentials
AWS_ACCOUNT_ID: aws_accountid
AWS_ACCESS_KEY: aws_accesskey
AWS_SECRET_ACCESS_KEY: aws_secretaccesskey # pragma: allowlist secret - dummy value
ROUTE53_ACCESS_KEY: aws_route53_access_key # pragma: allowlist secret - dummy value
ROUTE53_SECRET_ACCESS_KEY: aws_route53_secret_access_key # pragma: allowlist secret - dummy value
# Dummy Central TLS env variables
CENTRAL_TLS_CERT: central_tls_cert # pragma: allowlist secret - dummy value
CENTRAL_TLS_KEY: central_tls_key # pragma: allowlist secret - dummy value
# So that OCM secrets are initialised
DOCKER_PR_CHECK: true
TEST_TIMEOUT: 30m
services:
postgres:
image: postgres:11
Expand Down Expand Up @@ -106,21 +119,30 @@ jobs:
export PATH=${PATH}:$GOPATH/bin
make verify binary test test/integration
timeout-minutes: 14
- name: Build and publish fleet-manager-tools image to quay.io
if: github.event_name == 'push'
env:
QUAY_USER: ${{ secrets.QUAY_RHACS_ENG_FM_RW_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_RHACS_ENG_FM_RW_PASSWORD }}
QUAY_IMAGE_REPOSITORY: rhacs-eng/fleet-manager-tools
run: |
chmod +x ./build_push_fleet_manager_tools.sh
./build_push_fleet_manager_tools.sh
- name: Build and publish fleet* image to quay.io
build-push-images:
name: "Build and push fleet* images to quay.io"
runs-on: ubuntu-latest
needs: [pre-commit, verify-test]
# Skip for external contributions.
if: |
github.event_name == 'push' || !github.event.pull_request.head.repo.fork
steps:
- name: Login to Quay.io
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_RHACS_ENG_FM_RW_USERNAME }}
password: ${{ secrets.QUAY_RHACS_ENG_FM_RW_PASSWORD }}
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Critical for correct image detection in Makefile
- name: Build and push fleet-manager-tools image to quay.io
if: github.event_name == 'push'
env:
QUAY_USER: ${{ secrets.QUAY_RHACS_ENG_FM_RW_USERNAME }}
QUAY_TOKEN: ${{ secrets.QUAY_RHACS_ENG_FM_RW_PASSWORD }}
QUAY_IMAGE_REPOSITORY: rhacs-eng/fleet-manager
run: |
chmod +x ./build_push_fleet_manager.sh
./build_push_fleet_manager.sh
TAG: ${{ github.ref_name }}
run: make image/push/fleet-manager-tools
- name: Build and push fleetshard-operator image to quay.io
run: make image/push/fleetshard-operator
- name: Build and push fleet-manager image to quay.io
run: make image/push/fleet-manager
24 changes: 0 additions & 24 deletions .github/workflows/pre-commit.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
"filename": "dp-terraform/helm/rhacs-terraform/charts/observability/templates/01-operator-06-cr.yaml",
"hashed_secret": "3e513f12b341ed3327bea645a728401b5d0f9ddb",
"is_verified": false,
"line_number": 15
"line_number": 21
}
],
"dp-terraform/helm/rhacs-terraform/charts/secured-cluster/init-bundle.yaml": [
Expand Down Expand Up @@ -564,5 +564,5 @@
}
]
},
"generated_at": "2023-11-06T14:09:00Z"
"generated_at": "2023-11-13T13:31:40Z"
}
33 changes: 16 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,10 @@ SHELL = bash
binary:=fleet-manager

# The image tag for building and pushing comes from TAG environment variable by default.
# If there is no TAG env than CI_TAG is used instead.
# Otherwise image tag is generated based on git tags.
# Otherwise image tag is generated based on current commit hash.
# The version should be a 7-char hash from git. This is what the deployment process in app-interface expects.
ifeq ($(TAG),)
ifeq (,$(wildcard CI_TAG))
ifeq ($(IGNORE_REPOSITORY_DIRTINESS),true)
TAG=$(shell git describe --tags --abbrev=10 --long)
else
TAG=$(shell git describe --tags --abbrev=10 --dirty --long)
endif
else
TAG=$(shell cat CI_TAG)
endif
TAG=$(shell git rev-parse --short=7 HEAD)
endif
image_tag = $(TAG)

Expand Down Expand Up @@ -50,9 +42,6 @@ probe_image_repository:=$(PROBE_IMAGE_NAME)
external_image_registry:= $(IMAGE_REGISTRY)
internal_image_registry:=image-registry.openshift-image-registry.svc:5000

# Test image name that will be used for PR checks
test_image:=test/$(IMAGE_NAME)

DOCKER ?= docker
DOCKER_CONFIG ?= "${HOME}/.docker"

Expand Down Expand Up @@ -535,17 +524,17 @@ image/build/probe:
.PHONY: image/build/probe

image/build/fleet-manager-tools: GOOS=linux
image/build/fleet-manager-tools: IMAGE_REF="$(external_image_registry)/rhacs-eng/fleet-manager-tools:$(image_tag)"
image/build/fleet-manager-tools: IMAGE_REF="$(external_image_registry)/fleet-manager-tools:$(image_tag)"
image/build/fleet-manager-tools: fleet-manager fleetshard-sync acsfleetctl
DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) build -t $(IMAGE_REF) -f Dockerfile.tools .
DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) tag $(IMAGE_REF) fleet-manager-tools:$(image_tag)
.PHONY: image/build/multi-target/fleet-manager-tools

image/push/fleet-manager-tools: IMAGE_REF="$(external_image_registry)/rhacs-eng/fleet-manager-tools:$(image_tag)"
image/push/fleet-manager-tools: IMAGE_REF="$(external_image_registry)/fleet-manager-tools:$(image_tag)"
image/push/fleet-manager-tools: image/build/fleet-manager-tools
DOCKER_CONFIG=${DOCKER_CONFIG} $(DOCKER) push $(IMAGE_REF)
@echo
@echo "Image fleet-manager tools was pushed as $(IMAGE_REF)."
@echo "Image fleet-manager-tools was pushed as $(IMAGE_REF)."
.PHONY: image/push/fleet-manager-tools

# Build and push the image
Expand Down Expand Up @@ -574,6 +563,16 @@ image/push/internal: docker/login/internal
$(DOCKER) push "$(shell oc get route default-route -n openshift-image-registry -o jsonpath="{.spec.host}")/$(probe_image_repository):$(IMAGE_TAG)"
.PHONY: image/push/internal

image/build/fleetshard-operator: IMAGE_REF="$(external_image_registry)/fleetshard-operator:$(image_tag)"
image/build/fleetshard-operator:
$(DOCKER) build -t $(IMAGE_REF) ${PROJECT_PATH}/dp-terraform/helm
.PHONY: image/build/fleetshard-operator

image/push/fleetshard-operator: IMAGE_REF="$(external_image_registry)/fleetshard-operator:$(image_tag)"
image/push/fleetshard-operator: image/build/fleetshard-operator
$(DOCKER) push $(IMAGE_REF)
.PHONY: image/push/fleetshard-operator

# Run the probe based e2e test in container
test/e2e/probe/run: image/build/probe
test/e2e/probe/run: IMAGE_REF="$(external_image_registry)/$(probe_image_repository):$(image_tag)"
Expand Down
1 change: 0 additions & 1 deletion build_push_fleet_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ make \
DOCKER_CONFIG="${DOCKER_CONFIG}" \
QUAY_USER="${QUAY_USER}" \
QUAY_TOKEN="${QUAY_TOKEN}" \
TAG="${VERSION}" \
external_image_registry="quay.io" \
internal_image_registry="quay.io" \
image_repository="${IMAGE_REPOSITORY}" \
Expand Down
49 changes: 0 additions & 49 deletions build_push_fleet_manager_tools.sh

This file was deleted.

1 change: 0 additions & 1 deletion build_push_probe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ make \
DOCKER_CONFIG="${DOCKER_CONFIG}" \
QUAY_PROBE_USER="${QUAY_USER}" \
QUAY_PROBE_TOKEN="${QUAY_TOKEN}" \
TAG="${VERSION}" \
external_image_registry="quay.io" \
internal_image_registry="quay.io" \
probe_image_repository="${IMAGE_REPOSITORY}" \
Expand Down
6 changes: 3 additions & 3 deletions cmd/fleet-manager/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ func TestInjections(t *testing.T) {

var bootList []environments.BootService
env.MustResolve(&bootList)
Expect(len(bootList)).To(Equal(6))
Expect(len(bootList)).To(Equal(7))

_, ok := bootList[0].(*server.APIServer)
Expect(ok).To(Equal(true))
_, ok = bootList[1].(*server.MetricsServer)
Expect(ok).To(Equal(true))
_, ok = bootList[2].(*server.HealthCheckServer)
_, ok = bootList[3].(*server.HealthCheckServer)
Expect(ok).To(Equal(true))
_, ok = bootList[3].(*workers.LeaderElectionManager)
_, ok = bootList[4].(*workers.LeaderElectionManager)
Expect(ok).To(Equal(true))

var workerList []workers.Worker
Expand Down
12 changes: 6 additions & 6 deletions deploy/helm/probe/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
ROOT_DIR="$SCRIPT_DIR/../../.."

# shellcheck source=scripts/lib/external_config.sh
source "$SCRIPT_DIR/../../../scripts/lib/external_config.sh"
source "$ROOT_DIR/scripts/lib/external_config.sh"
# shellcheck source=scripts/lib/helm.sh
source "$SCRIPT_DIR/../../../scripts/lib/helm.sh"
source "$ROOT_DIR/scripts/lib/helm.sh"

if [[ $# -ne 2 ]]; then
echo "Usage: $0 [environment] [cluster]" >&2
Expand All @@ -19,8 +20,7 @@ ENVIRONMENT=$1
CLUSTER_NAME=$2
PROBE_IMAGE_ORG="rhacs-eng"
PROBE_IMAGE_NAME="blackbox-monitoring-probe-service"
# Get HEAD for both main and production. This is the latest merged commit.
PROBE_IMAGE_TAG="$(git rev-parse --short=7 HEAD)"
PROBE_IMAGE_TAG="$(make --quiet --no-print-directory -C "${ROOT_DIR}" tag)"
PROBE_IMAGE="quay.io/${PROBE_IMAGE_ORG}/${PROBE_IMAGE_NAME}:${PROBE_IMAGE_TAG}"

init_chamber
Expand Down Expand Up @@ -57,9 +57,9 @@ if [[ $CLUSTER_ENVIRONMENT != "$ENVIRONMENT" ]]; then
fi

if [[ "${HELM_DRY_RUN:-}" == "true" ]]; then
"${SCRIPT_DIR}/../../../scripts/check_image_exists.sh" "${PROBE_IMAGE_ORG}" "${PROBE_IMAGE_NAME}" "${PROBE_IMAGE_TAG}" 0 || echo >&2 "Ignoring failed image check in dry-run mode."
"${ROOT_DIR}/scripts/check_image_exists.sh" "${PROBE_IMAGE_ORG}" "${PROBE_IMAGE_NAME}" "${PROBE_IMAGE_TAG}" 0 || echo >&2 "Ignoring failed image check in dry-run mode."
else
"${SCRIPT_DIR}/../../../scripts/check_image_exists.sh" "${PROBE_IMAGE_ORG}" "${PROBE_IMAGE_NAME}" "${PROBE_IMAGE_TAG}"
"${ROOT_DIR}/scripts/check_image_exists.sh" "${PROBE_IMAGE_ORG}" "${PROBE_IMAGE_NAME}" "${PROBE_IMAGE_TAG}"
fi

load_external_config "cluster-${CLUSTER_NAME}" CLUSTER_
Expand Down
2 changes: 1 addition & 1 deletion dev/config/dataplane-cluster-configuration-crc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ clusters:
region: standalone
schedulable: true
status: ready
central_instance_limit: 5
central_instance_limit: 9999
provider_type: standalone
supported_instance_type: "eval,standard"
cluster_dns: apps-crc.testing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ clusters:
provider_type: standalone
supported_instance_type: "eval,standard"
cluster_dns: kubernetes.docker.internal
central_instance_limit: 5
central_instance_limit: 9999
2 changes: 1 addition & 1 deletion dev/config/dataplane-cluster-configuration-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ clusters:
provider_type: standalone
supported_instance_type: "eval,standard"
cluster_dns: kubernetes.docker.internal
central_instance_limit: 5
central_instance_limit: 99999
2 changes: 1 addition & 1 deletion dev/config/dataplane-cluster-configuration-minikube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ clusters:
region: standalone
schedulable: true
status: ready
central_instance_limit: 5
central_instance_limit: 9999
provider_type: standalone
supported_instance_type: "eval,standard"
cluster_dns: cluster.local
Loading
Loading