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

[COST-5631] bundle for v3.3.2 #477

Merged
merged 3 commits into from
Nov 5, 2024
Merged
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
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
PREVIOUS_VERSION ?= 3.3.0
VERSION ?= 3.3.1
PREVIOUS_VERSION ?= 3.3.1
VERSION ?= 3.3.2

MIN_KUBE_VERSION = 1.24.0
MIN_OCP_VERSION = 4.12
Expand Down Expand Up @@ -273,8 +273,7 @@ get-token-and-cert: ## Get a token from a running K8s cluster for local develop

.PHONY: bundle
bundle: operator-sdk manifests kustomize ## Generate bundle manifests and metadata, then validate generated files.
mkdir -p koku-metrics-operator/$(VERSION)/
rm -rf ./bundle koku-metrics-operator/$(VERSION)/
rm -rf ./bundle
$(OPERATOR_SDK) generate kustomize manifests
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMAGE_SHA)
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
Expand All @@ -289,12 +288,9 @@ bundle: operator-sdk manifests kustomize ## Generate bundle manifests and metada
ifdef NAMESPACE
$(YQ) -i '.metadata.namespace = "$(NAMESPACE)"' bundle/manifests/koku-metrics-operator.clusterserviceversion.yaml
endif
sed -i '' '/^COPY / s/bundle\///g' bundle.Dockerfile

cp -r ./bundle/ koku-metrics-operator/$(VERSION)/
cp bundle.Dockerfile koku-metrics-operator/$(VERSION)/Dockerfile
$(OPERATOR_SDK) bundle validate koku-metrics-operator/$(VERSION) --select-optional name=multiarch
$(OPERATOR_SDK) bundle validate koku-metrics-operator/$(VERSION) --select-optional suite=operatorframework
$(OPERATOR_SDK) bundle validate bundle/ --select-optional name=multiarch
$(OPERATOR_SDK) bundle validate bundle/ --select-optional suite=operatorframework

.PHONY: bundle-build
bundle-build: ## Build the bundle image.
Expand Down
42 changes: 35 additions & 7 deletions bundle/manifests/koku-metrics-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ metadata:
capabilities: Seamless Upgrades
categories: Monitoring
certified: "false"
containerImage: quay.io/project-koku/koku-metrics-operator@sha256:fe2a887778e30850b94983038ed621d8df6e45d1028f3d1110cc8aa20439bedd
createdAt: "2024-08-09T15:42:34Z"
containerImage: quay.io/project-koku/koku-metrics-operator@sha256:c1b430cb1d699289c05fc1944d06bd6e6d09a886ab15a4f7b01f779b8ffef9b7
createdAt: "2024-11-05T20:59:20Z"
description: A Golang-based OpenShift Operator that generates and uploads OpenShift usage metrics to cost management.
features.operators.openshift.io/cnf: "false"
features.operators.openshift.io/cni: "false"
features.operators.openshift.io/csi: "false"
features.operators.openshift.io/disconnected: "true"
features.operators.openshift.io/fips-compliant: "false"
features.operators.openshift.io/proxy-aware: "true"
Expand All @@ -61,7 +64,7 @@ metadata:
operatorframework.io/arch.ppc64le: supported
operatorframework.io/arch.s390x: supported
operatorframework.io/os.linux: supported
name: koku-metrics-operator.v3.3.1
name: koku-metrics-operator.v3.3.2
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -94,6 +97,25 @@ spec:
* PersistentVolumeClaim (PVC) configuration: The KokuMetricsConfig CR can accept a PVC definition and the operator will create and mount the PVC. If one is not provided, a default PVC will be created.
* Restricted network installation: this operator can function on a restricted network. In this mode, the operator stores the packaged reports for manual retrieval.

## New in v3.3.2:
* Leader election settings are now configurable via environment variables. These variables can be modified in the operator [Subscription](https://github.com/operator-framework/operator-lifecycle-manager/blob/5a01f50258003e248bd5630df0837fe0bb0f1cb7/doc/design/subscription-config.md). The values should be specified as durations in seconds in the format `<number-of-seconds>s`. The default values for `LEADER_ELECTION_LEASE_DURATION`, `LEADER_ELECTION_RENEW_DEADLINE`, and `LEADER_ELECTION_RETRY_PERIOD` are '60s', '30s', and '5s', respectively.

```
kind: Subscription
metadata:
...
spec:
...
config:
env:
- name: LEADER_ELECTION_LEASE_DURATION
value: "60s"
- name: LEADER_ELECTION_RENEW_DEADLINE
value: "30s"
- name: LEADER_ELECTION_RETRY_PERIOD
value: "5s"
```

## New in v3.3.1:
* Optimize memory usage when reading CSV files.

Expand Down Expand Up @@ -441,13 +463,19 @@ spec:
command:
- /manager
env:
- name: LEADER_ELECTION_LEASE_DURATION
value: 60s
- name: LEADER_ELECTION_RENEW_DEADLINE
value: 30s
- name: LEADER_ELECTION_RETRY_PERIOD
value: 5s
- name: IN_CLUSTER
value: "true"
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
image: quay.io/project-koku/koku-metrics-operator@sha256:fe2a887778e30850b94983038ed621d8df6e45d1028f3d1110cc8aa20439bedd
image: quay.io/project-koku/koku-metrics-operator@sha256:c1b430cb1d699289c05fc1944d06bd6e6d09a886ab15a4f7b01f779b8ffef9b7
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -611,8 +639,8 @@ spec:
minKubeVersion: 1.24.0
provider:
name: Red Hat
version: 3.3.1
version: 3.3.2
relatedImages:
- name: koku-metrics-operator
image: quay.io/project-koku/koku-metrics-operator@sha256:fe2a887778e30850b94983038ed621d8df6e45d1028f3d1110cc8aa20439bedd
replaces: koku-metrics-operator.v3.3.0
image: quay.io/project-koku/koku-metrics-operator@sha256:c1b430cb1d699289c05fc1944d06bd6e6d09a886ab15a4f7b01f779b8ffef9b7
replaces: koku-metrics-operator.v3.3.1
4 changes: 2 additions & 2 deletions docs/csv-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ The Koku Metrics Operator (`koku-metrics-operator`) collects the metrics require
config:
env:
- name: LEADER_ELECTION_LEASE_DURATION
value: "30s"
value: "60s"
- name: LEADER_ELECTION_RENEW_DEADLINE
value: "10s"
value: "30s"
- name: LEADER_ELECTION_RETRY_PERIOD
value: "5s"
```
Expand Down