Skip to content

Commit 8c0a2d0

Browse files
authored
Merge branch 'InditexTech:main' into main
2 parents d386d18 + 5904218 commit 8c0a2d0

8 files changed

Lines changed: 23 additions & 201 deletions

File tree

.github/workflows/release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
version: ${{ steps.version.outputs.version }}
1919
values_version: ${{ steps.version.outputs.values_version }}
2020
chart_version: ${{ steps.version.outputs.chart_version }}
21+
catalog_version: ${{ steps.version.outputs.catalog_version }}
2122
steps:
2223
- name: 🛎️ Checkout
2324
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -29,6 +30,7 @@ jobs:
2930
echo "version=$(make print-VERSION | cut -d'=' -f2)" >> $GITHUB_OUTPUT
3031
echo "values_version=$(yq '.deployment.image.tag' chart/values.yaml)" >> $GITHUB_OUTPUT
3132
echo "chart_version=$(yq '.appVersion' chart/Chart.yaml)" >> $GITHUB_OUTPUT
33+
echo "catalog_version=$(yq '.spec.image' deploy/catalog_source.yaml | cut -d':' -f2)" >> $GITHUB_OUTPUT
3234
echo $GITHUB_OUTPUT
3335
3436
check:
@@ -42,6 +44,7 @@ jobs:
4244
echo "values_version: ${{ needs.release.outputs.values_version }}"
4345
echo "chart_version: ${{ needs.release.outputs.chart_version }}"
4446
echo "tag_name: ${{ github.event.release.tag_name }}"
47+
echo "catalog_version: ${{ needs.release.outputs.catalog_version }}"
4548
4649
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.version }}" ]; then
4750
echo "Version in Makefile does not match release tag"
@@ -58,6 +61,11 @@ jobs:
5861
exit 1
5962
fi
6063
64+
if [ "${{ github.event.release.tag_name }}" != "${{ needs.release.outputs.catalog_version }}" ]; then
65+
echo "Version in deploy/catalog_source.yaml does not match release tag"
66+
exit 1
67+
fi
68+
6169
6270
build:
6371
name: 🛠️ Build Operator images
@@ -88,4 +96,4 @@ jobs:
8896
make bundle-build bundle-push
8997
- name: 🏗️ Build and push Operator catalog
9098
run: |
91-
make catalog-build catalog-push
99+
make catalog-build catalog-push

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ When adding new Custom Resource Definitions (CRDs):
8989

9090
```bash
9191
# Create a new API
92-
operator-sdk create api --group overcommit --version v1alpha1 --kind YourNewResource --resource --controller
92+
operator-sdk create api --group overcommit --version v1alphav1 --kind YourNewResource --resource --controller
9393
```
9494

9595
#### Building and Testing
@@ -167,7 +167,7 @@ k8s-overcommit-operator/
167167
├── .github/ # GitHub workflows and templates
168168
│ └── workflows/ # CI/CD pipelines
169169
├── api/ # Kubernetes API definitions
170-
│ └── v1alpha1/ # API version v1alpha1
170+
│ └── v1alphav1/ # API version v1alphav1
171171
│ ├── overcommitclass_types.go # OvercommitClass CRD definition
172172
│ ├── overcommitclass_webhook.go # Webhook implementation
173173
│ ├── overcommitclass_webhook_test.go # Webhook tests
@@ -201,7 +201,7 @@ k8s-overcommit-operator/
201201
│ │ ├── role_binding.yaml # Role binding
202202
│ │ └── service_account.yaml # Service account
203203
│ ├── samples/ # Sample Custom Resources
204-
│ │ └── overcommit_v1alpha1_overcommitclass.yaml
204+
│ │ └── overcommit_v1alphav1_overcommitclass.yaml
205205
│ └── webhook/ # Webhook configuration
206206
│ ├── kustomization.yaml
207207
│ ├── manifests.yaml
@@ -242,9 +242,9 @@ k8s-overcommit-operator/
242242

243243
### Directory Details
244244

245-
#### `/api/v1alpha1/`
245+
#### `/api/v1alphav1/`
246246

247-
Contains the Kubernetes API definitions for the v1alpha1 version:
247+
Contains the Kubernetes API definitions for the v1alphav1 version:
248248

249249
- **overcommitclass_types.go**: Defines the OvercommitClass Custom Resource Definition (CRD) structure
250250
- **overcommitclass_webhook.go**: Implements admission webhooks for validation and mutation

chart/README.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

deploy/catalog_source.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ metadata:
55
namespace: olm
66
spec:
77
sourceType: grpc
8-
image: ghcr.io/inditextech/k8s-overcommit-operator-catalog:1.1.4
8+
image: ghcr.io/inditextech/k8s-overcommit-operator-catalog:1.0.1
99
displayName: K8s Overcommit Operator Catalog
1010
publisher: Inditex Tech

deploy/chart/1.0.0/README.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

deploy/chart/1.0.1/README.md

Lines changed: 0 additions & 62 deletions
This file was deleted.

docs/architecture.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ The **k8s-overcommit Operator** is a Kubernetes-native operator designed to inte
4646
|-----------|---------|----------|
4747
| **Overcommit Controller** | Manages main Overcommit resource and deploys OvercommitClass controllers | [`internal/controller/overcommitclass/`](../internal/controller/overcommitclass/) |
4848
| **OvercommitClass Controller** | Watches OvercommitClass resources and configures webhooks | [`internal/resources/generate_resources_overcommit_class_controller_controller.go`](../internal/resources/generate_resources_overcommit_class_controller_controller.go) |
49-
| **Pod Mutating Webhook** | Modifies pod resource requests based on overcommit policies | [`api/v1alpha1/overcommitclass_webhook.go`](../internal/webhook/v1alphav1/mutating/pod_webhook.go) |
50-
| **OvercommitClass Validating Webhook** | Validates OvercommitClass resource specifications | [`internal/webhook/v1alphav1/mutating/pod_webhook.go`](../api/v1alpha1/overcommitclass_webhook.go) |
49+
| **Pod Mutating Webhook** | Modifies pod resource requests based on overcommit policies | [`api/v1alphav1/overcommitclass_webhook.go`](../internal/webhook/v1alphav1/mutating/pod_webhook.go) |
50+
| **OvercommitClass Validating Webhook** | Validates OvercommitClass resource specifications | [`internal/webhook/v1alphav1/mutating/pod_webhook.go`](../api/v1alphav1/overcommitclass_webhook.go) |
5151
| **Pod Validating Webhook** | Validates Pod With Unexisting Class | [`internal/webhook/v1alphav1/validating/pod_webhook.go`](../internal/webhook/v1alphav1/validating/pod_webhook.go) |
5252
| **Certificate Manager** | Generates and manages TLS certificates for webhooks | [`internal/resources/generate_issuer.go`](../internal/resources/generate_issuer.go) |
5353

@@ -112,7 +112,7 @@ flowchart TD
112112
The main configuration resource that enables the operator:
113113

114114
```yaml
115-
apiVersion: overcommit.inditex.dev/v1alpha1
115+
apiVersion: overcommit.inditex.dev/v1alphav1
116116
kind: Overcommit
117117
metadata:
118118
name: cluster
@@ -135,7 +135,7 @@ spec:
135135
Defines overcommit policies for different workload types:
136136

137137
```yaml
138-
apiVersion: overcommit.inditex.dev/v1alpha1
138+
apiVersion: overcommit.inditex.dev/v1alphav1
139139
kind: OvercommitClass
140140
metadata:
141141
name: high-density
@@ -186,7 +186,7 @@ webhooks:
186186

187187
### Webhook Logic Implementation
188188

189-
The webhook implementation in [`api/v1alpha1/overcommitclass_webhook.go`](../api/v1alpha1/overcommitclass_webhook.go) follows this logic:
189+
The webhook implementation in [`api/v1alphav1/overcommitclass_webhook.go`](../api/v1alphav1/overcommitclass_webhook.go) follows this logic:
190190

191191
1. **Label Resolution**: Check pod → namespace → default class
192192
2. **Namespace Exclusion**: Apply regex patterns to exclude critical namespaces
@@ -336,7 +336,7 @@ make run ARGS="--zap-log-level=debug"
336336
### Development Environment
337337

338338
```yaml
339-
apiVersion: overcommit.inditex.dev/v1alpha1
339+
apiVersion: overcommit.inditex.dev/v1alphav1
340340
kind: OvercommitClass
341341
metadata:
342342
name: development
@@ -350,7 +350,7 @@ spec:
350350
### Production Environment
351351

352352
```yaml
353-
apiVersion: overcommit.inditex.dev/v1alpha1
353+
apiVersion: overcommit.inditex.dev/v1alphav1
354354
kind: OvercommitClass
355355
metadata:
356356
name: production

docs/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ kubectl apply -f https://raw.githubusercontent.com/InditexTech/k8s-overcommit-op
7070
You can create your own subscription or use the default [`subscription.yaml`](../deploy/subscription.yaml). Below is an example:
7171

7272
```yaml
73-
apiVersion: operators.coreos.com/v1alpha1
73+
apiVersion: operators.coreos.com/v1alphav1
7474
kind: Subscription
7575
metadata:
7676
name: k8s-overcommit-operator

0 commit comments

Comments
 (0)