Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/go_modules-31a164182c
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz-Smelcerz-SAP authored Jun 4, 2024
2 parents af5586b + b4c0d2b commit 4adebf9
Show file tree
Hide file tree
Showing 126 changed files with 2,483 additions and 2,240 deletions.
4 changes: 4 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ linters-settings:
alias: metricsserver
- pkg: github.com/prometheus/client_model/go
alias: prometheusclient
- pkg: github.com/kyma-project/lifecycle-manager/pkg/testutils/skrcontextimpl
alias: testskrcontext
- pkg: github.com/kyma-project/lifecycle-manager/internal/controller/watcher
alias: watcherctrl
ireturn:
allow:
- anon
Expand Down
31 changes: 31 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This is a configuration file for the markdownlint. You can use this file to overwrite the default settings.
# MD004 checks if the asterisk symbol is used for unordered list items
MD004:
style: asterisk
# MD013 is set to false by default because many files include lines longer than the conventional 80 character limit
MD013: false
# MD024 disable the Multiple headings with the same content rule
MD024: false
# MD029 Set to false because it generates issues with longer lists
MD029: false
# MD033 is set to false to allow for inline HTML elements in a Markdown document
MD033: false
# MD044 is used to set capitalization for particular words. You can determine whether it should be used also for code blocks and HTML elements
MD044:
code_blocks: false
html_elements: false
names:
- Kyma
- Kubernetes
- ConfigMap
- CronJob
- CustomResourceDefinition
- Ingress
- Node
- PodPreset
- Pod
- ProwJob
- Secret
- ServiceBinding
- ServiceClass
- ServiceInstance
8 changes: 4 additions & 4 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/Masterminds/semver/v3 v3.2.1
github.com/open-component-model/ocm v0.10.0
k8s.io/apimachinery v0.30.1
sigs.k8s.io/controller-runtime v0.18.2
sigs.k8s.io/controller-runtime v0.18.3
)

require (
Expand Down Expand Up @@ -235,9 +235,9 @@ require (
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
helm.sh/helm/v3 v3.14.4 // indirect
k8s.io/api v0.30.0 // indirect
k8s.io/apiextensions-apiserver v0.30.0 // indirect
k8s.io/client-go v0.30.0 // indirect
k8s.io/api v0.30.1 // indirect
k8s.io/apiextensions-apiserver v0.30.1 // indirect
k8s.io/client-go v0.30.1 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
Expand Down
16 changes: 8 additions & 8 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1091,16 +1091,16 @@ helm.sh/helm/v3 v3.14.4 h1:6FSpEfqyDalHq3kUr4gOMThhgY55kXUEjdQoyODYnrM=
helm.sh/helm/v3 v3.14.4/go.mod h1:Tje7LL4gprZpuBNTbG34d1Xn5NmRT3OWfBRwpOSer9I=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA=
k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE=
k8s.io/apiextensions-apiserver v0.30.0 h1:jcZFKMqnICJfRxTgnC4E+Hpcq8UEhT8B2lhBcQ+6uAs=
k8s.io/apiextensions-apiserver v0.30.0/go.mod h1:N9ogQFGcrbWqAY9p2mUAL5mGxsLqwgtUce127VtRX5Y=
k8s.io/api v0.30.1 h1:kCm/6mADMdbAxmIh0LBjS54nQBE+U4KmbCfIkF5CpJY=
k8s.io/api v0.30.1/go.mod h1:ddbN2C0+0DIiPntan/bye3SW3PdwLa11/0yqwvuRrJM=
k8s.io/apiextensions-apiserver v0.30.1 h1:4fAJZ9985BmpJG6PkoxVRpXv9vmPUOVzl614xarePws=
k8s.io/apiextensions-apiserver v0.30.1/go.mod h1:R4GuSrlhgq43oRY9sF2IToFh7PVlF1JjfWdoG3pixk4=
k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U=
k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
k8s.io/cli-runtime v0.30.0 h1:0vn6/XhOvn1RJ2KJOC6IRR2CGqrpT6QQF4+8pYpWQ48=
k8s.io/cli-runtime v0.30.0/go.mod h1:vATpDMATVTMA79sZ0YUCzlMelf6rUjoBzlp+RnoM+cg=
k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ=
k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY=
k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q=
k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc=
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
Expand All @@ -1109,8 +1109,8 @@ k8s.io/utils v0.0.0-20240310230437-4693a0247e57 h1:gbqbevonBh57eILzModw6mrkbwM0g
k8s.io/utils v0.0.0-20240310230437-4693a0247e57/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
oras.land/oras-go v1.2.5 h1:XpYuAwAb0DfQsunIyMfeET92emK8km3W4yEzZvUbsTo=
oras.land/oras-go v1.2.5/go.mod h1:PuAwRShRZCsZb7g8Ar3jKKQR/2A/qN+pkYxIOd/FAoo=
sigs.k8s.io/controller-runtime v0.18.2 h1:RqVW6Kpeaji67CY5nPEfRz6ZfFMk0lWQlNrLqlNpx+Q=
sigs.k8s.io/controller-runtime v0.18.2/go.mod h1:tuAt1+wbVsXIT8lPtk5RURxqAnq7xkpv2Mhttslg7Hw=
sigs.k8s.io/controller-runtime v0.18.3 h1:B5Wmmo8WMWK7izei+2LlXLVDGzMwAHBNLX68lwtlSR4=
sigs.k8s.io/controller-runtime v0.18.3/go.mod h1:TVoGrfdpbA9VRFaRnKgk9P5/atA0pMwq+f+msb9M8Sg=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/kustomize/api v0.17.1 h1:MYJBOP/yQ3/5tp4/sf6HiiMfNNyO97LmtnirH9SLNr4=
Expand Down
1 change: 0 additions & 1 deletion api/shared/operator_annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const (
// corresponding CR in KCP.
OwnedByAnnotation = OperatorGroup + Separator + "owned-by"
OwnedByFormat = "%s/%s"
SyncStrategyAnnotation = "sync-strategy"
IsClusterScopedAnnotation = OperatorGroup + Separator + "is-cluster-scoped"
CustomStateCheckAnnotation = OperatorGroup + Separator + "custom-state-check"
ModuleVersionAnnotation = OperatorGroup + Separator + "module-version"
Expand Down
22 changes: 13 additions & 9 deletions api/shared/operator_labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ const (
// ManagedBy defines the controller managing the resource.
ManagedBy = OperatorGroup + Separator + "managed-by"

KymaName = OperatorGroup + Separator + "kyma-name"
Signature = OperatorGroup + Separator + "signature"
ModuleName = OperatorGroup + Separator + "module-name"
IsMandatoryModule = OperatorGroup + Separator + "mandatory-module"
IstioInjectionLabel = "istio-injection"
WardenLabel = "namespaces.warden.kyma-project.io/validate"
EnabledValue = "enabled"
KymaName = OperatorGroup + Separator + "kyma-name"
Signature = OperatorGroup + Separator + "signature"
ModuleName = OperatorGroup + Separator + "module-name"
IsMandatoryModule = OperatorGroup + Separator + "mandatory-module"

//nolint:gosec // OCI registry credits label, no confidential content
OCIRegistryCredLabel = "oci-registry-cred"
Expand All @@ -23,11 +26,12 @@ const (
PurposeLabel = OperatorGroup + Separator + "purpose"
CertManager = "klm-watcher-cert-manager"
// SkipReconcileLabel indicates this specific resource will be skipped during reconciliation.
SkipReconcileLabel = OperatorGroup + Separator + "skip-reconciliation"
UnmanagedKyma = "unmanaged-kyma"
DefaultRemoteKymaName = "default"
InternalLabel = OperatorGroup + Separator + "internal"
BetaLabel = OperatorGroup + Separator + "beta"
SkipReconcileLabel = OperatorGroup + Separator + "skip-reconciliation"
UnmanagedKyma = "unmanaged-kyma"
DefaultRemoteKymaName = "default"
DefaultRemoteNamespace = "kyma-system"
InternalLabel = OperatorGroup + Separator + "internal"
BetaLabel = OperatorGroup + Separator + "beta"

// Controls ModuleTemplate sync logic.
// If put on the Kyma object, allows to disable sync for all ModuleTemplatesByLabel
Expand Down
13 changes: 8 additions & 5 deletions api/v1beta2/kyma_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (

"k8s.io/apimachinery/pkg/api/meta"
apimetav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"

"github.com/kyma-project/lifecycle-manager/api/shared"
Expand Down Expand Up @@ -107,11 +108,6 @@ const (
// lookup, or other behavioral patterns when interacting with the remote cluster.
type SyncStrategy string

const (
SyncStrategyLocalSecret = "local-secret"
SyncStrategyLocalClient = "local-client"
)

func (kyma *Kyma) GetModuleStatusMap() map[string]*ModuleStatus {
moduleStatusMap := make(map[string]*ModuleStatus)
for i := range kyma.Status.Modules {
Expand Down Expand Up @@ -442,3 +438,10 @@ func (kyma *Kyma) EnsureLabelsAndFinalizers() bool {
}
return updateRequired
}

func (kyma *Kyma) GetNamespacedName() types.NamespacedName {
return types.NamespacedName{
Namespace: kyma.GetNamespace(),
Name: kyma.GetName(),
}
}
Loading

0 comments on commit 4adebf9

Please sign in to comment.