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

Cleanup hack folder: remove backup, restore, and shoot-comparator tools #651

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
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
27 changes: 0 additions & 27 deletions .github/workflows/build_shoot_compare.yml

This file was deleted.

26 changes: 7 additions & 19 deletions api/v1/runtime_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
const (
Finalizer = "runtime-controller.infrastructure-manager.kyma-project.io/deletion-hook"
AnnotationGardenerCloudDelConfirmation = "confirmation.gardener.cloud/deletion"
LabelControlledByProvisioner = "kyma-project.io/controlled-by-provisioner"
)

const (
Expand Down Expand Up @@ -62,20 +61,18 @@ const (
type RuntimeConditionType string

const (
ConditionTypeRuntimeProvisioned RuntimeConditionType = "Provisioned"
ConditionTypeRuntimeProvisionedDryRun RuntimeConditionType = "ProvisionedDryRun"
ConditionTypeRuntimeKubeconfigReady RuntimeConditionType = "KubeconfigReady"
ConditionTypeOidcConfigured RuntimeConditionType = "OidcConfigured"
ConditionTypeRuntimeConfigured RuntimeConditionType = "Configured"
ConditionTypeRuntimeDeprovisioned RuntimeConditionType = "Deprovisioned"
ConditionTypeRuntimeProvisioned RuntimeConditionType = "Provisioned"
ConditionTypeRuntimeKubeconfigReady RuntimeConditionType = "KubeconfigReady"
ConditionTypeOidcConfigured RuntimeConditionType = "OidcConfigured"
ConditionTypeRuntimeConfigured RuntimeConditionType = "Configured"
ConditionTypeRuntimeDeprovisioned RuntimeConditionType = "Deprovisioned"
)

type RuntimeConditionReason string

const (
ConditionReasonProcessing = RuntimeConditionReason("Processing")
ConditionReasonProcessingErr = RuntimeConditionReason("ProcessingErr")
ConditionReasonProcessingCompleted = RuntimeConditionReason("ProcessingCompleted")
ConditionReasonProcessing = RuntimeConditionReason("Processing")
ConditionReasonProcessingErr = RuntimeConditionReason("ProcessingErr")

ConditionReasonInitialized = RuntimeConditionReason("Initialised")
ConditionReasonShootCreationPending = RuntimeConditionReason("Pending")
Expand All @@ -86,16 +83,12 @@ const (
ConditionReasonConfigurationCompleted = RuntimeConditionReason("ConfigurationCompleted")
ConditionReasonConfigurationErr = RuntimeConditionReason("ConfigurationError")

ConditionReasonDeletion = RuntimeConditionReason("Deletion")
ConditionReasonGardenerCRDeleted = RuntimeConditionReason("GardenerClusterCRDeleted")
ConditionReasonGardenerShootDeleted = RuntimeConditionReason("GardenerShootDeleted")
ConditionReasonDeletionErr = RuntimeConditionReason("DeletionErr")
ConditionReasonConversionError = RuntimeConditionReason("ConversionErr")
ConditionReasonCreationError = RuntimeConditionReason("CreationErr")
ConditionReasonGardenerError = RuntimeConditionReason("GardenerErr")
ConditionReasonKubernetesAPIErr = RuntimeConditionReason("KubernetesErr")
ConditionReasonSerializationError = RuntimeConditionReason("SerializationErr")
ConditionReasonDeleted = RuntimeConditionReason("Deleted")

ConditionReasonAuditLogError = RuntimeConditionReason("AuditLogErr")

Expand Down Expand Up @@ -309,8 +302,3 @@ func (k *Runtime) ValidateRequiredLabels() error {
}
return nil
}

func (k *Runtime) IsControlledByProvisioner() bool {
value, found := k.Labels[LabelControlledByProvisioner]
return !found || value != "false"
}
76 changes: 0 additions & 76 deletions api/v1/runtime_types_test.go

This file was deleted.

5 changes: 0 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ func main() {
var runtimeCtrlWorkersCnt int
var gardenerClusterCtrlWorkersCnt int
var converterConfigFilepath string
var shootSpecDumpEnabled bool
var auditLogMandatory bool

flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
Expand All @@ -121,7 +120,6 @@ func main() {
flag.IntVar(&runtimeCtrlWorkersCnt, "runtime-ctrl-workers-cnt", defaultRuntimeCtrlWorkersCnt, "A number of workers running in parallel for Runtime Controller")
flag.IntVar(&gardenerClusterCtrlWorkersCnt, "gardener-cluster-ctrl-workers-cnt", defaultGardenerClusterCtrlWorkersCnt, "A number of workers running in parallel for Gardener Cluster Controller")
flag.StringVar(&converterConfigFilepath, "converter-config-filepath", "/converter-config/converter_config.json", "A file path to the gardener shoot converter configuration.")
flag.BoolVar(&shootSpecDumpEnabled, "shoot-spec-dump-enabled", false, "Feature flag to allow persisting specs of created shoots")
flag.BoolVar(&auditLogMandatory, "audit-log-mandatory", true, "Feature flag to enable strict mode for audit log configuration")

opts := zap.Options{}
Expand Down Expand Up @@ -224,9 +222,6 @@ func main() {
Metrics: metrics,
AuditLogging: auditLogDataMap,
}
if shootSpecDumpEnabled {
cfg.PVCPath = "/testdata/kim"
}

runtimeReconciler := runtime_controller.NewRuntimeReconciler(
mgr,
Expand Down
19 changes: 3 additions & 16 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ Run `make test` to see if all tests are passing.
6. `gardener-ctrl-reconcilation-timeout` - timeout for duration of the reconlication for Gardener Cluster Controller. Default value is `60s`.
7. `gardener-ratelimiter-qps` - Gardener client rate limiter QPS parameter for Runtime Controller. Default value is `5`.
8. `gardener-ratelimiter-burst` - Gardener client rate limiter Burst parameter for Runtime Controller. Default value is `5`.
9. `shoot-spec-dump-enabled` - feature flag responsible for enabling the shoot spec dump. Default value is `false`.
10. `audit-log-mandatory` - feature flag responsible for enabling the Audit Log strict config. Default value is `true`.
11. `runtime-ctrl-workers-cnt` - number of workers running in parallel for Runtime Controller. Default value is `25`.
12. `gardener-cluster-ctrl-workers-cnt` - number of workers running in parallel for GardenerCluster Controller. Default value is `25`.
9. `audit-log-mandatory` - feature flag responsible for enabling the Audit Log strict config. Default value is `true`.
10. `runtime-ctrl-workers-cnt` - number of workers running in parallel for Runtime Controller. Default value is `25`.
11. `gardener-cluster-ctrl-workers-cnt` - number of workers running in parallel for GardenerCluster Controller. Default value is `25`.

See [manager_gardener_secret_patch.yaml](../config/default/manager_gardener_secret_patch.yaml) for default values.

## Troubleshooting

### Runtime Custom Resources Configuration
Expand All @@ -35,14 +33,3 @@ The following annotations can control runtime behavior:
| ------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| operator.kyma-project.io/force-patch-reconciliation | If set to `true`, the next reconciliation loop enters the patch state regardless of the `runtime-generation` number. This annotation is removed automatically after attempting the patch operation. Might produce the `object has been modified` error in the RuntimeController logs until the state is reconciled. |
| operator.kyma-project.io/suspend-patch-reconciliation | If set to`true`, the controller does not patch the shoot. It has to be manually removed to resume normal operation. |


### Switching Between `provisioner` and `kim`.

The `kyma-project.io/controlled-by-provisioner` label provides fine-grained control over the `Runtime` CR. Only if the label value is set to `false`, the resource is considered managed and will be controlled by `kyma-application-manager`.

> TBD: List potential issues and provide tips on how to avoid or solve them. To structure the content, use the following sections:
>
> - **Symptom**
> - **Cause**
> - **Remedy**
140 changes: 0 additions & 140 deletions hack/runtime-migrator/README-rb.md

This file was deleted.

Loading
Loading