Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/internal/tools/github.…
Browse files Browse the repository at this point in the history
…com/vladopajic/go-test-coverage/v2-2.11.1
  • Loading branch information
skhalash authored Dec 16, 2024
2 parents 9ec8d9e + 6874669 commit e0fe26a
Show file tree
Hide file tree
Showing 28 changed files with 22 additions and 128 deletions.
2 changes: 1 addition & 1 deletion .github/template/prepare-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ runs:
- name: Deploy module experimental
if: ${{ !inputs.release }}
shell: bash
run: make --debug deploy-dev
run: make --debug deploy-experimental

- name: Wait for manager readiness
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-docu-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: "./.github/template/setup-golang"

- name: Verify manifests
run: make crd-docs-gen manifests-dev check-clean
run: make crd-docs-gen manifests-experimental check-clean

markdown-link-check:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
failure: failure()
job-name: ${{ github.job }}-${{ matrix.ginkgo-labels }}

e2e-dev:
e2e-experimental:
needs: setup
strategy:
fail-fast: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-lifecycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
run: |
# add the tag PR-<number> to the image if it is a PR, if the trigger is merge_group, then add the sha as the tag
TAG="${{ github.event_name == 'pull_request' && 'PR-' || '' }}${{ github.event.number || github.event.merge_group.head_sha }}"
IMG=europe-docker.pkg.dev/kyma-project/dev/telemetry-manager:${TAG} make deploy-dev
IMG=europe-docker.pkg.dev/kyma-project/dev/telemetry-manager:${TAG} make deploy-experimental
- name: Wait for manager readiness
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
run: hack/release.sh ${{ github.ref_name }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GORELEASER_CURRENT_TAG: "${{ github.ref_name }}" # Explicitly set release tag to do not use -dev tag
GORELEASER_CURRENT_TAG: "${{ github.ref_name }}" # Explicitly set release tag to avoid ambiguity
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ tls.key
moduletemplate.yaml
# Generated manifests
telemetry-manager.yaml
# Generated manifests for experimental channel
telemetry-manager-dev.yaml
# Generated manifests for experimental release
telemetry-manager-experimental.yaml
# The default Telemetry CR which is installed by the lifecycle-manager
telemetry-default-cr.yaml

2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ changelog:
release:
extra_files:
- glob: telemetry-manager.yaml
- glob: telemetry-manager-dev.yaml
- glob: telemetry-manager-experimental.yaml
- glob: telemetry-default-cr.yaml
builds:
-
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ manifests: $(CONTROLLER_GEN) $(YQ) $(YAMLFMT) ## Generate WebhookConfiguration,
$(YQ) eval 'del(.. | select(has("log")).log)' -i ./config/crd/bases/operator.kyma-project.io_telemetries.yaml
$(YAMLFMT)

.PHONY: manifests-dev
manifests-dev: $(CONTROLLER_GEN) $(YAMLFMT) ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition for v1alpha1 and v1beta1.
.PHONY: manifests-experimental
manifests-experimental: $(CONTROLLER_GEN) $(YAMLFMT) ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition for v1alpha1 and v1beta1.
$(CONTROLLER_GEN) rbac:roleName=manager-role webhook crd paths="./..." output:crd:artifacts:config=config/development/crd/bases
$(YAMLFMT)

Expand Down Expand Up @@ -154,7 +154,7 @@ build: generate fmt vet tidy ## Build manager binary.

check-clean: ## Check if repo is clean up-to-date. Used after code generation
@echo "Checking if all generated files are up-to-date"
@git diff --name-only --exit-code || (echo "Generated files are not up-to-date. Please run 'make generate manifests manifests-dev crd-docs-gen' to update them." && exit 1)
@git diff --name-only --exit-code || (echo "Generated files are not up-to-date. Please run 'make generate manifests manifests-experimental crd-docs-gen' to update them." && exit 1)


tls.key:
Expand Down Expand Up @@ -207,11 +207,11 @@ deploy: manifests $(KUSTOMIZE) ## Deploy resources based on the release (default
undeploy: $(KUSTOMIZE) ## Undeploy resources based on the release (default) variant from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

.PHONY: deploy-dev
deploy-dev: manifests-dev $(KUSTOMIZE) ## Deploy resources based on the development variant to the K8s cluster specified in ~/.kube/config.
.PHONY: deploy-experimental
deploy-experimental: manifests-experimental $(KUSTOMIZE) ## Deploy resources based on the development variant to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/development | kubectl apply -f -

.PHONY: undeploy-dev
undeploy-dev: $(KUSTOMIZE) ## Undeploy resources based on the development variant from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
.PHONY: undeploy-experimental
undeploy-experimental: $(KUSTOMIZE) ## Undeploy resources based on the development variant from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
$(KUSTOMIZE) build config/development | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
1 change: 0 additions & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ spec:
periodSeconds: 10
resources:
limits:
cpu: 300m
memory: 384Mi
requests:
cpu: 5m
Expand Down
2 changes: 0 additions & 2 deletions controllers/telemetry/logpipeline_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ const (

var (
// FluentBit
fbCPULimit = resource.MustParse("1")
fbMemoryLimit = resource.MustParse("1Gi")
fbCPURequest = resource.MustParse("100m")
fbMemoryRequest = resource.MustParse("50Mi")
Expand Down Expand Up @@ -168,7 +167,6 @@ func configureFluentBitReconciler(client client.Client, config LogPipelineContro
FluentBitImage: config.FluentBitImage,
ExporterImage: config.ExporterImage,
PriorityClassName: config.FluentBitPriorityClassName,
CPULimit: fbCPULimit,
MemoryLimit: fbMemoryLimit,
CPURequest: fbCPURequest,
MemoryRequest: fbMemoryRequest,
Expand Down
2 changes: 1 addition & 1 deletion docs/contributor/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ For development, use the following commands:
make docker-build
make docker-push
kubectl create ns kyma-system
make deploy-dev
make deploy-experimental
```

- Clean up everything
Expand Down
2 changes: 1 addition & 1 deletion docs/contributor/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export IMG=<my container repo>
make docker-build
make docker-push
kubectl create ns kyma-system
make deploy-dev
make deploy-experimental
```

## Install Telemetry Manager in Your Cluster From Latest Release
Expand Down
2 changes: 1 addition & 1 deletion docs/contributor/pocs/performance-tests/metrics/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For the test environment, the following setup was used:
1. Deploy Telemetry Manager:

```shell
make deploy-dev
make deploy-experimental
```

2. Deploy monitoring and Istio:
Expand Down
4 changes: 1 addition & 3 deletions docs/contributor/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@ This release process covers the steps to release new major and minor versions fo

```bash
git tag {RELEASE_VERSION}
git tag {RELEASE_DEV_VERSION}
```

Replace {RELEASE_VERSION} with the new module version, for example, `1.0.0`, and replace {RELEASE_DEV_VERSION} with the new development module version, for example, `1.0.0-dev`.
Replace {RELEASE_VERSION} with the new module version, for example, `1.0.0`.

9. Push the tags to the upstream repository.

```bash
git push upstream {RELEASE_VERSION}
git push upstream {RELEASE_DEV_VERSION}
```

The {RELEASE_VERSION} tag triggers the GitHub actions `Build Image` and `Tag Release`. The `Build Image` action builds the `telemetry-manager` image, tags it with the module version, and pushes it to the production registry. `Tag Release` action creates the GitHub release.
Expand Down
21 changes: 0 additions & 21 deletions hack/get-kyma-filename.sh

This file was deleted.

6 changes: 3 additions & 3 deletions hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ readonly CURRENT_VERSION="$1"
function prepare_release_artefacts() {
echo "Preparing release artefacts"
cd config/manager && ${KUSTOMIZE} edit set image controller="${IMG}" && cd ../..
# Create the resources file that is used for creating the ModuleTemplate for fast and regular channels
# Create the resources file that is used for creating the ModuleTemplate for regular
${KUSTOMIZE} build config/default > telemetry-manager.yaml
# Create the resources file that is used for creating the ModuleTemplate for experimental channel
${KUSTOMIZE} build config/development > telemetry-manager-dev.yaml
# Create the resources file that is used for creating the ModuleTemplate for experimental release
${KUSTOMIZE} build config/development > telemetry-manager-experimental.yaml
# Rename the file for Telemetry default CR to have a better naming as a release artefact
cp ./config/samples/operator_v1alpha1_telemetry.yaml telemetry-default-cr.yaml
}
Expand Down
46 changes: 0 additions & 46 deletions hack/upgrade-test.sh

This file was deleted.

3 changes: 0 additions & 3 deletions internal/resources/fluentbit/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type DaemonSetConfig struct {
FluentBitConfigPrepperImage string
ExporterImage string
PriorityClassName string
CPULimit resource.Quantity
MemoryLimit resource.Quantity
CPURequest resource.Quantity
MemoryRequest resource.Quantity
Expand All @@ -39,7 +38,6 @@ func MakeDaemonSet(name types.NamespacedName, checksum string, dsConfig DaemonSe
corev1.ResourceMemory: dsConfig.MemoryRequest,
},
Limits: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceCPU: dsConfig.CPULimit,
corev1.ResourceMemory: dsConfig.MemoryLimit,
},
}
Expand All @@ -51,7 +49,6 @@ func MakeDaemonSet(name types.NamespacedName, checksum string, dsConfig DaemonSe
corev1.ResourceMemory: resource.MustParse("5Mi"),
},
Limits: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceCPU: resource.MustParse("100m"),
corev1.ResourceMemory: resource.MustParse("50Mi"),
},
}
Expand Down
2 changes: 0 additions & 2 deletions internal/resources/fluentbit/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ func TestMakeDaemonSet(t *testing.T) {
FluentBitConfigPrepperImage: "foo-configprepper",
ExporterImage: "foo-exporter",
PriorityClassName: "foo-prio-class",
CPULimit: resource.MustParse(".25"),
MemoryLimit: resource.MustParse("400Mi"),
CPURequest: resource.MustParse(".1"),
MemoryRequest: resource.MustParse("100Mi"),
Expand Down Expand Up @@ -55,7 +54,6 @@ func TestMakeDaemonSet(t *testing.T) {
resources := daemonSet.Spec.Template.Spec.Containers[0].Resources
require.Equal(t, ds.CPURequest, *resources.Requests.Cpu(), "cpu requests should be defined")
require.Equal(t, ds.MemoryRequest, *resources.Requests.Memory(), "memory requests should be defined")
require.Equal(t, ds.CPULimit, *resources.Limits.Cpu(), "cpu limit should be defined")
require.Equal(t, ds.MemoryLimit, *resources.Limits.Memory(), "memory limit should be defined")

containerSecurityContext := daemonSet.Spec.Template.Spec.Containers[0].SecurityContext
Expand Down
4 changes: 0 additions & 4 deletions internal/resources/otelcollector/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const (
)

var (
metricAgentCPULimit = resource.MustParse("1")
metricAgentMemoryLimit = resource.MustParse("1200Mi")
metricAgentCPURequest = resource.MustParse("15m")
metricAgentMemoryRequest = resource.MustParse("50Mi")
Expand All @@ -49,7 +48,6 @@ func NewMetricAgentApplierDeleter(image, namespace, priorityClassName string) *A
namespace: namespace,
priorityClassName: priorityClassName,
rbac: makeMetricAgentRBAC(namespace),
cpuLimit: metricAgentCPULimit,
memoryLimit: metricAgentMemoryLimit,
cpuRequest: metricAgentCPURequest,
memoryRequest: metricAgentMemoryRequest,
Expand All @@ -64,7 +62,6 @@ type AgentApplierDeleter struct {
priorityClassName string
rbac rbac

cpuLimit resource.Quantity
memoryLimit resource.Quantity
cpuRequest resource.Quantity
memoryRequest resource.Quantity
Expand Down Expand Up @@ -181,7 +178,6 @@ func (aad *AgentApplierDeleter) makeAgentDaemonSet(configChecksum string) *appsv
func (aad *AgentApplierDeleter) makeAgentResourceRequirements() corev1.ResourceRequirements {
return corev1.ResourceRequirements{
Limits: map[corev1.ResourceName]resource.Quantity{
corev1.ResourceCPU: aad.cpuLimit,
corev1.ResourceMemory: aad.memoryLimit,
},
Requests: map[corev1.ResourceName]resource.Quantity{
Expand Down
Loading

0 comments on commit e0fe26a

Please sign in to comment.