diff --git a/Makefile b/Makefile index 8e03a180b9..0af03185c4 100644 --- a/Makefile +++ b/Makefile @@ -125,7 +125,7 @@ debug-build: .PHONY: debug debug: debug-build - LOG_LEVEL=$(LOG_LEVEL) dlv --listen=:2345 --headless=true --api-version=2 exec ./bin/kotsadm-debug api + LOG_LEVEL=$(LOG_LEVEL) /dlv --listen=:30001 --headless=true --api-version=2 exec ./bin/kotsadm-debug api .PHONY: web web: diff --git a/dev/dockerfiles/kotsadm/Dockerfile.local b/dev/dockerfiles/kotsadm/Dockerfile.local index 0eb5324cd7..db1f505a51 100644 --- a/dev/dockerfiles/kotsadm/Dockerfile.local +++ b/dev/dockerfiles/kotsadm/Dockerfile.local @@ -1,6 +1,6 @@ FROM golang:1.23-alpine AS dlv-builder -RUN go install github.com/go-delve/delve/cmd/dlv@v1.22.1 +RUN go install github.com/go-delve/delve/cmd/dlv@v1.23.1 FROM golang:1.23-alpine diff --git a/dev/manifests/kotsadm/minio.yaml b/dev/manifests/kotsadm/minio.yaml index 3665d80a9b..06beaf1191 100644 --- a/dev/manifests/kotsadm/minio.yaml +++ b/dev/manifests/kotsadm/minio.yaml @@ -70,7 +70,6 @@ spec: volumeMounts: - mountPath: /data name: miniodata # this is where the data is stored - volumeClaimTemplates: - metadata: name: miniodata diff --git a/pkg/operator/client/delete.go b/pkg/operator/client/delete.go index 90477a0dfa..8b89e564cf 100644 --- a/pkg/operator/client/delete.go +++ b/pkg/operator/client/delete.go @@ -79,6 +79,13 @@ func (c *Client) diffAndDeleteManifests(opts DiffAndDeleteOptions) error { } } + // if this is a keep resource, don't delete it + // e.g. for migration to Helm v1beta2 + if keep, ok := o.Metadata.Annotations["kots.io/keep"]; ok && keep == "true" { + logger.Infof("skipping deletion of resource %s/%s", o.Kind, o.Metadata.Name) + delete = false + } + decodedPreviousMap[k] = previousObject{ spec: string(decodedPreviousDoc), delete: delete, diff --git a/pkg/operator/client/gvkn.go b/pkg/operator/client/gvkn.go index 169571e534..b1bba34ee4 100644 --- a/pkg/operator/client/gvkn.go +++ b/pkg/operator/client/gvkn.go @@ -14,9 +14,10 @@ type OverlySimpleGVKWithName struct { } type OverlySimpleMetadata struct { - Name string `yaml:"name"` - Namespace string `yaml:"namespace"` - Labels map[string]string `yaml:"labels,omitempty"` + Name string `yaml:"name"` + Namespace string `yaml:"namespace"` + Labels map[string]string `yaml:"labels,omitempty"` + Annotations map[string]string `yaml:"annotations,omitempty"` } func GetGVKWithNameAndNs(content []byte, baseNS string) (string, OverlySimpleGVKWithName) {