Skip to content

Commit

Permalink
Merge branch 'main' into adelhajhassan/expose_kubernetes_labels_as_ta…
Browse files Browse the repository at this point in the history
…gs_and_annotations_as_tags
  • Loading branch information
adel121 authored Aug 29, 2024
2 parents 0a67116 + 93b9f8f commit 66862d3
Show file tree
Hide file tree
Showing 97 changed files with 6,547 additions and 16,144 deletions.
6 changes: 4 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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: a1d921006e35
TEST_INFRA_DEFINITIONS_BUILDIMAGES: 3c7d2dc2d3dd
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 @@ -56,14 +56,16 @@ stages:
KUBERNETES_MEMORY_LIMIT: 16Gi

.on_run_e2e:
- if: '$CI_COMMIT_BRANCH =~ /^mq-working-branch-/'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"'
when: always
- if: $CI_COMMIT_BRANCH
changes:
paths:
- "*.md"
compare_to: "refs/heads/main"
when: never
- if: '$CI_COMMIT_BRANCH =~ /^mq-working-branch-/'
when: never
# Temporarily disable on Conductor-triggered jobs
- if: '$DDR != "true"'
when: manual
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 as builder
FROM golang:1.22.4 AS builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,10 @@ 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`.
cd config/e2e && $(ROOT)/$(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/e2e
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

.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`.
cd config/e2e && $(ROOT)/$(KUSTOMIZE) edit set image controller=$(IMG)
$(KUSTOMIZE) build config/e2e
KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e --tags=e2e github.com/DataDog/datadog-operator/e2e -v -timeout 1h -coverprofile cover_e2e_keep_stacks.out -args -keep-stacks=true

.PHONY: bundle
Expand Down
26 changes: 26 additions & 0 deletions apis/datadoghq/common/v1/agent_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package common
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

// AgentImageConfig defines the agent container image config.
Expand Down Expand Up @@ -126,3 +127,28 @@ type DeploymentStatus struct {
// DeploymentName corresponds to the name of the Deployment.
DeploymentName string `json:"deploymentName,omitempty"`
}

// The deployment strategy to use to replace existing pods with new ones.
// +k8s:openapi-gen=true
// +kubebuilder:object:generate=true
type UpdateStrategy struct {
// Type can be "RollingUpdate" or "OnDelete" for DaemonSets and "RollingUpdate"
// or "Recreate" for Deployments
Type string `json:"type,omitempty"`
// Configure the rolling update strategy of the Deployment or DaemonSet.
RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty"`
}

// RollingUpdate describes how to replace existing pods with new ones.
// +k8s:openapi-gen=true
// +kubebuilder:object:generate=true
type RollingUpdate struct {
// The maximum number of pods that can be unavailable during the update.
// Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
// Refer to the Kubernetes API documentation for additional details..
MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`

// MaxSurge behaves differently based on the Kubernetes resource. Refer to the
// Kubernetes API documentation for additional details.
MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty"`
}
46 changes: 46 additions & 0 deletions apis/datadoghq/common/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 66862d3

Please sign in to comment.