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

Dev #866

Merged
merged 218 commits into from
Dec 1, 2024
Merged

Dev #866

merged 218 commits into from
Dec 1, 2024

Conversation

gianlucam76
Copy link
Member

No description provided.

gianlucam76 and others added 30 commits September 25, 2024 12:21
Clusters marked as deleted are scheduled for removal once their finalizer is removed.
Therefore, initiating cleanup while a cluster is in this state is redundant.

Prior to this change, Sveltos would trigger cleanup for a cluster instance even
if it was marked as deleted. However, if Sveltos invoked the Helm SDK as part
of the cleanup and the Helm uninstall client encountered an unreachable cluster
api-server, the Helm SDK would become stuck.

To prevent this issue and avoid unnecessary feature cleanup for clusters marked
for deletion, this PR has been implemented.
(bug) when cluster is marked as deleted avoid triggering cleanup
…nup"

Sveltos deploys resources in the management cluster when the `deploymenType`
is set to `Local`.
Even if a cluster is marked as deleted, Sveltos will still need to remove
all resources deployed in the management cluster for that cluster.
So this PR lets Sveltos undeploy even for clusters marked as deleted.

If the managed cluster API server is unreachable after the
Helm SDK uninstall is triggered, the Helm SDK will get stuck.
Helm charts are only deployed in the matching cluster, so Sveltos
will skip calling Helm uninstall for any deleted cluster.

This reverts commit ce9e7f6.
Revert "(bug) when cluster is marked as deleted avoid triggering clea…
bump clusterapi to v1.8.4
(chore): bump golangci-lint to v1.61.0
In large cluster, number of Secrets and ConfigMaps might be high.
Do not cache those.

In order to avoid fetching the Secret with cluster Kubeconfig, create
a in memory cluster cache with restConfig.

This feature is currently disabled. To enable set `disable-secret-caching=true`
(chore) prepare for release v0.40.0
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
When cluster is still present but marked as deleted, Sveltos can
avoid removing resources (helm charts and/or kubernetes resources)
from such a cluster.
Anything else created in the management cluster for such managed cluster
still needs to be removed.
It was incorrectly pointing to a libsveltos fork
DisableHooks is already exposed at HelmOptions level and applies
to install/upgrade/uninstall.

Sometimes it is convenient to disable hooks only for install or upgrade
or uninstall.
This PR exposes DisableHooks at:
- HelmInstallOptions
- HelmUpgradeOptions
- HelmInstallOptions

If set to true in one of the above, overrides the settings at HelmOptions level.
(feat) Expose DisableHooks for install/upgrade/uninstall
gianlucam76 and others added 27 commits November 26, 2024 15:57
…functions

(feat) add more template functions
…inx-stable-nginx-ingress-1.x

chore(deps): update helm release nginx-stable/nginx-ingress to v1.4.2
…afana-grafana-8.x

chore(deps): update helm release grafana/grafana to v8.6.2
…tio-istiod-1.x

chore(deps): update helm release istio/istiod to v1.24.1
…tio-gateway-1.x

chore(deps): update helm release istio/gateway to v1.24.1
…tio-base-1.x

chore(deps): update helm release istio/base to v1.24.1
- getResource clears managedFields, resourceVersion and UID
- removeField return object after modification
…functions

(chore) fix getResource and removeField
…afana-grafana-8.x

chore(deps): update helm release grafana/grafana to v8.6.3
…afana-grafana-8.x

chore(deps): update helm release grafana/grafana to v8.6.3
…ometheus-community-prometheus-26.x

chore(deps): update helm release prometheus-community/prometheus to v26
When in DryRun mode, Sveltos creates a ClusterReport containing the
list of changes compared to current configuration.
For raw Kubernetes resources this includes listing:
1. resources that would be created
2. resources that would be deleted
3. resources that would be updated

Sveltos now provides a more granular view of proposed changes during Dry Run mode
for updates. A detailed diff highlighting exact changes, such as added, modified,
or removed fields.

Example:

```yaml
    resourceReports:
    - action: Update
      message: |
        --- ClusterPolicy disallow-latest-tag
        +++ ClusterPolicy disallow-latest-tag
        @@ -49,7 +49,7 @@
                       name: validate-image-tag
                       skipBackgroundRequests: true
                       validate:
        -                message: Using a mutable image tag e.g. 'latest' is not allowed.
        +                message: Using a mutable image tag e.g. 'latest' is not allowed in produdction clusters.
                         pattern:
                             spec:
```
…functions

(feat): track full diff for resources
DryRun ClusterSummaries are periodically updated to reflect
changes in the cluster.
This PR ensures the Status is always set to Provisioning to
avoid unnecessary reconciliations.
…iliations

(perf) ClusterSummary in DryRun mode
…rifts

Feature track drifts -- fixed clustername
@gianlucam76 gianlucam76 merged commit 7160f1e into projectsveltos:dev Dec 1, 2024
10 checks passed
@gianlucam76 gianlucam76 deleted the dev branch December 1, 2024 08:16
@gianlucam76 gianlucam76 restored the dev branch December 1, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants