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

Re-enable remote config E2E tests #1616

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1075a08
add localkind provisioner
fanny-jiang Dec 3, 2024
dd8a9d1
refactor logs test
fanny-jiang Dec 4, 2024
3226c67
add back old provisioner
fanny-jiang Dec 5, 2024
123109b
reorganize tests
fanny-jiang Dec 6, 2024
b907f4b
bump deps and cleanup
fanny-jiang Dec 17, 2024
7a7eb96
Merge branch 'main' into fanny/refactor-kind-e2e
fanny-jiang Dec 17, 2024
58f0860
sync go version
fanny-jiang Dec 17, 2024
3610f22
update licenses, bump crypto version
fanny-jiang Dec 18, 2024
69e5d32
Merge branch 'main' into fanny/refactor-kind-e2e
fanny-jiang Dec 18, 2024
a4f07dc
bump test-infra-defs, fixes for CI
fanny-jiang Dec 18, 2024
53482a9
move vars
fanny-jiang Dec 18, 2024
793e23b
sync go version
fanny-jiang Dec 18, 2024
d3fcaff
Merge branch 'main' into fanny/refactor-kind-e2e
fanny-jiang Dec 27, 2024
c37380a
Add AWS kind E2E provisioner (#1593)
fanny-jiang Jan 3, 2025
dd018ac
Merge branch 'main' into fanny/refactor-kind-e2e
fanny-jiang Jan 3, 2025
a408715
fix var
fanny-jiang Jan 6, 2025
8ad0c66
Add make command to run a specific e2e test (#1547)
swang392 Jan 6, 2025
a214611
re-enable rc e2e
fanny-jiang Jan 9, 2025
969610b
update licenses
fanny-jiang Jan 9, 2025
4f6af20
[CECO-1153] APM e2e test (#1549)
tbavelier Jan 10, 2025
8876dc2
enable gitlab runner timestamps
fanny-jiang Jan 10, 2025
f506933
Merge branch 'fanny/refactor-kind-e2e' into fanny/renable-rc-e2e
fanny-jiang Jan 10, 2025
b0f9f4b
bump e2e deps
fanny-jiang Jan 10, 2025
57cf056
Merge branch 'fanny/refactor-kind-e2e' into fanny/renable-rc-e2e
fanny-jiang Jan 10, 2025
6a8f52b
cleanup unused vars, sync deps
fanny-jiang Jan 10, 2025
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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "mcr.microsoft.com/devcontainers/go:dev-1.22",
"image": "mcr.microsoft.com/devcontainers/go:dev-1.23",
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build
env:
GO_VERSION: 1.22.7
GO_VERSION: 1.23.1
on:
push:
# Permission forced by repo-level setting; only elevate on job-level
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
# packages: read
env:
PROJECTNAME: "datadog-operator"
GO_VERSION: 1.22.7
GO_VERSION: 1.23.1
jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
contents: read
# packages: read
env:
GO_VERSION: 1.22.7
GO_VERSION: 1.23.1
jobs:
build-linux-binary:
if: startsWith(github.ref, 'refs/tags/v')
Expand Down
13 changes: 7 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image: registry.ddbuild.io/images/mirror/golang:1.22.7
image: registry.ddbuild.io/images/mirror/golang:1.23.1
variables:
PROJECTNAME: "datadog-operator"
PROJECTNAME_CHECK: "datadog-operator-check"
Expand All @@ -13,7 +13,7 @@ variables:
RH_PARTNER_REGISTRY_USER: "redhat-isv-containers+5e7c8ebc1c86a3163d1a69be-robot"
RH_PARTNER_REGISTRY_KEY_SSM_KEY: redhat_registry_key
RH_PARTNER_API_KEY_SSM_KEY: redhat_api_key
TEST_INFRA_DEFINITIONS_BUILDIMAGES: 3c7d2dc2d3dd
TEST_INFRA_DEFINITIONS_BUILDIMAGES: f61405297d57
PUSH_IMAGES_TO_STAGING:
description: "Set PUSH_IMAGE_TO_STAGING to 'true' if you want to push the operator to internal staging registry."

Expand Down Expand Up @@ -42,13 +42,13 @@ stages:
- aws ssm get-parameter --region us-east-1 --name ci.datadog-operator.agent-qa-profile --with-decryption --query "Parameter.Value" --out text >> ~/.aws/config
- export AWS_PROFILE=agent-qa-ci
# Now all `aws` commands target the agent-qa profile
- aws ssm get-parameter --region us-east-1 --name ci.datadog-operator.ssh_public_key --with-decryption --query "Parameter.Value" --out text > $E2E_PUBLIC_KEY_PATH
- aws ssm get-parameter --region us-east-1 --name ci.datadog-operator.ssh_private_key --with-decryption --query "Parameter.Value" --out text > $E2E_PRIVATE_KEY_PATH
- aws ssm get-parameter --region us-east-1 --name ci.datadog-operator.ssh_public_key --with-decryption --query "Parameter.Value" --out text > $E2E_AWS_PUBLIC_KEY_PATH
- aws ssm get-parameter --region us-east-1 --name ci.datadog-operator.ssh_private_key --with-decryption --query "Parameter.Value" --out text > $E2E_AWS_PRIVATE_KEY_PATH
# Use S3 backend to store stack status
- pulumi login "s3://dd-pulumi-state?region=us-east-1&awssdk=v2&profile=$AWS_PROFILE"
variables:
E2E_PUBLIC_KEY_PATH: /tmp/agent-qa-ssh-key.pub
E2E_PRIVATE_KEY_PATH: /tmp/agent-qa-ssh-key
E2E_AWS_PUBLIC_KEY_PATH: /tmp/agent-qa-ssh-key.pub
E2E_AWS_PRIVATE_KEY_PATH: /tmp/agent-qa-ssh-key
E2E_KEY_PAIR_NAME: ci.datadog-operator
KUBERNETES_MEMORY_REQUEST: 12Gi
KUBERNETES_MEMORY_LIMIT: 16Gi
Expand Down Expand Up @@ -421,6 +421,7 @@ e2e:
extends: .new_e2e_template
variables:
TARGET_IMAGE: $E2E_DOCKER_REGISTRY:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}
FF_TIMESTAMPS: true
needs:
- "trigger_e2e_operator_image"
rules: !reference [.on_run_e2e]
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22.7 AS builder
FROM golang:1.23.1 AS builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
4 changes: 4 additions & 0 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ core,github.com/hashicorp/hcl,MPL-2.0
core,github.com/imdario/mergo,BSD-3-Clause
core,github.com/josharian/intern,MIT
core,github.com/json-iterator/go,MIT
core,github.com/klauspost/compress,Apache-2.0
core,github.com/klauspost/compress/internal/snapref,BSD-3-Clause
core,github.com/klauspost/compress/zstd/internal/xxhash,MIT
core,github.com/magiconair/properties,BSD-2-Clause
core,github.com/mailru/easyjson,MIT
core,github.com/mitchellh/mapstructure,MIT
Expand All @@ -79,6 +82,7 @@ core,github.com/pelletier/go-toml,Apache-2.0
core,github.com/philhofer/fwd,MIT
core,github.com/pkg/errors,BSD-2-Clause
core,github.com/pmezard/go-difflib/difflib,BSD-3-Clause
core,github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil,BSD-3-Clause
core,github.com/prometheus/client_golang/prometheus,Apache-2.0
core,github.com/prometheus/client_model/go,Apache-2.0
core,github.com/prometheus/common,Apache-2.0
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,13 @@ integration-tests-v2: $(ENVTEST) ## Run tests with reconciler V2
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test --tags=integration_v2 github.com/DataDog/datadog-operator/internal/controller -coverprofile cover_integration_v2.out

.PHONY: e2e-tests
e2e-tests: manifests $(KUSTOMIZE) ## Run E2E tests and destroy environment stacks after tests complete. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests`.
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e --tags=e2e github.com/DataDog/datadog-operator/e2e -v -timeout 1h -coverprofile cover_e2e.out
e2e-tests: ## Run E2E tests and destroy environment stacks after tests complete. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests`.
@if [ -z "$(E2E_RUN_REGEX)" ]; then \
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e/ ./... -count=1 -v -timeout 0s -coverprofile cover_e2e.out; \
else \
echo "Running e2e test: $(E2E_RUN_REGEX)"; \
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e/ ./... -count=1 -v -run $(E2E_RUN_REGEX) -timeout 0s -coverprofile cover_e2e.out; \
fi

.PHONY: e2e-tests-keep-stacks
e2e-tests-keep-stacks: manifests $(KUSTOMIZE) ## Run E2E tests and keep environment stacks running. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests-keep-stacks`.
Expand Down
2 changes: 1 addition & 1 deletion check-operator.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22.7 AS builder
FROM golang:1.23.1 AS builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
72 changes: 36 additions & 36 deletions config/e2e/e2e-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ kind: Namespace
metadata:
labels:
app.kubernetes.io/name: datadog-operator
name: system
name: e2e-operator
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: manager
namespace: system
namespace: e2e-operator
labels:
app.kubernetes.io/name: datadog-operator
control-plane: controller-manager
Expand All @@ -24,40 +24,40 @@ spec:
app.kubernetes.io/name: datadog-operator
spec:
containers:
- command:
- /manager
args:
- --enable-leader-election
- --pprof
image: controller:latest
imagePullPolicy: IfNotPresent
name: manager
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
resources:
limits:
cpu: 100m
memory: 250Mi
requests:
cpu: 100m
memory: 250Mi
ports:
- name: metrics
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /healthz/
port: 8081
periodSeconds: 10
- command:
- /manager
args:
- --enable-leader-election
- --pprof
image: controller:latest
imagePullPolicy: IfNotPresent
name: manager
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
resources:
limits:
cpu: 100m
memory: 250Mi
requests:
cpu: 100m
memory: 250Mi
ports:
- name: metrics
containerPort: 8080
protocol: TCP
livenessProbe:
httpGet:
path: /healthz/
port: 8081
periodSeconds: 10
imagePullSecrets:
- name: registry-credentials
terminationGracePeriodSeconds: 10
serviceAccountName: controller-manager
serviceAccountName: controller-manager
2 changes: 1 addition & 1 deletion config/e2e/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ images:
newTag: latest
kind: Kustomization
namePrefix: datadog-operator-e2e-
namespace: system
namespace: e2e-operator
patches:
- path: rc-e2e-manager.yaml
target:
Expand Down
2 changes: 1 addition & 1 deletion config/e2e/rc-e2e-manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: manager
namespace: system
namespace: e2e-operator
labels:
app.kubernetes.io/name: datadog-operator
control-plane: controller-manager
Expand Down
7 changes: 7 additions & 0 deletions config/new-e2e/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namePrefix: datadog-operator-e2e-
namespace: e2e-operator
resources:
- ../crd
- ../rbac
Loading
Loading