Skip to content

Commit

Permalink
Remove deprecated ControllerManagerConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
nesmabadr committed Apr 18, 2024
1 parent 50d2b43 commit 8a592a3
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 102 deletions.
3 changes: 0 additions & 3 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ commonLabels:


patches:
# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
# - manager_config_patch.yaml
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
- path: manager_webhook_patch.yaml
Expand Down
19 changes: 0 additions & 19 deletions config/default/manager_config_patch.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions config/load_test/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ patches:
target:
kind: Deployment
- path: patches/adjust_resources_in_deployment.yaml
# Mount the controller config file for loading manager configurations
# through a ComponentConfig type
# - manager_config_patch.yaml
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# crd/kustomization.yaml
- path: manager_webhook_patch.yaml
Expand Down
11 changes: 0 additions & 11 deletions config/manager/controller_manager_config.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ resources:
generatorOptions:
disableNameSuffixHash: true

configMapGenerator:
- files:
- controller_manager_config.yaml
name: manager-config

images:
- name: controller
newName: europe-docker.pkg.dev/kyma-project/prod/lifecycle-manager
Expand Down
17 changes: 0 additions & 17 deletions docs/developer-tutorials/starting-operator-with-webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,3 @@ For further information, read the [kubebuilder tutorial](https://book.kubebuilde
```bash
go run ./main.go ./flags.go --enable-webhooks
```

You can also enable webhooks by updating `config/manager/controller_manager_config.yaml`:

```yaml
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
health:
healthProbeBindAddress: :8081
metrics:
bindAddress: 127.0.0.1:8080
webhook:
port: 9443
leaderElection:
leaderElect: true
resourceName: 893110f7.kyma-project.io
enableWebhooks: true
```
2 changes: 1 addition & 1 deletion docs/technical-reference/api/moduleTemplate-cr.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ In this scenario, the `Ready` state will only be reached if both `module.state.f

### **.spec.descriptor**

The core of any ModuleTemplate CR, the descriptor can be one of the schemas mentioned in the latest version of the [OCM Software Specification](https://ocm.software/docs/cli/spec/). While it is a `runtime.RawExtension` in the Go types, it will be resolved via ValidatingWebhook into an internal descriptor with the help of the official [OCM library](https://github.com/open-component-model/ocm).
The core of any ModuleTemplate CR, the descriptor can be one of the schemas mentioned in the latest version of the [OCM Software Specification](https://ocm.software/docs/cli/). While it is a `runtime.RawExtension` in the Go types, it will be resolved via ValidatingWebhook into an internal descriptor with the help of the official [OCM library](https://github.com/open-component-model/ocm).

By default, it will most likely be easiest to use [Kyma CLI](https://github.com/kyma-project/cli/tree/main) and its `create module` command to create a template with a valid descriptor, but it can also be generated manually, for example using [OCM CLI](https://github.com/open-component-model/ocm/tree/main/cmds/ocm).

Expand Down
2 changes: 1 addition & 1 deletion internal/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestParseManifestToObjects(t *testing.T) {
{
"test template operator manifest, expect no error",
"template-operator-manifest.yaml",
14,
13,
assert.NoError,
},
{
Expand Down
21 changes: 0 additions & 21 deletions pkg/test_samples/oci/template-operator-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,6 @@ spec:
serviceAccountName: template-operator-controller-manager
terminationGracePeriodSeconds: 10
---
apiVersion: v1
data:
controller_manager_config.yaml: |
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
health:
healthProbeBindAddress: :8081
metrics:
bindAddress: 127.0.0.1:8080
webhook:
port: 9443
leaderElection:
leaderElect: true
resourceName: 76223278.kyma-project.io
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: template-operator.kyma-project.io
name: template-operator-manager-config
namespace: template-operator-system
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
21 changes: 0 additions & 21 deletions pkg/test_samples/raw-manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
apiVersion: v1
data:
controller_manager_config.yaml: |
apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
kind: ControllerManagerConfig
health:
healthProbeBindAddress: :8081
metrics:
bindAddress: 127.0.0.1:8080
webhook:
port: 9443
leaderElection:
leaderElect: true
resourceName: 76223278.kyma-project.io
kind: ConfigMap
metadata:
labels:
app.kubernetes.io/component: template-operator.kyma-project.io
name: template-operator-manager-config
namespace: kyma-system
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down

0 comments on commit 8a592a3

Please sign in to comment.