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 rc e2e #1606

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
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
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.0
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.0
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.0
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.0
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: 658f6c49e27c
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 @@ -116,6 +116,7 @@ check-golang-version:
script:
- make update-golang
- git diff --exit-code
allow_failure: true # temporary

generate_code:
stage: test
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.0 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
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ integration-tests-v2: $(ENVTEST) ## Run tests with reconciler V2

.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
cd test/e2e && go get github.com/DataDog/datadog-agent/test/new-e2e@9ebd4d1cebbe1c9141e3a6b54176fdea8a79dd91
cd $(ROOT)
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e ./... -count=1 -v -timeout=0s -coverprofile cover_e2e.out

.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.0 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