Skip to content

Commit 05d3907

Browse files
authored
Use new DR license field (#637)
* Use new DR license field
1 parent dbb2c35 commit 05d3907

File tree

7 files changed

+26
-26
lines changed

7 files changed

+26
-26
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARCH := $(shell uname -m)
44
APP_NAME = embedded-cluster
55
ADMIN_CONSOLE_CHART_URL = oci://registry.replicated.com/library
66
ADMIN_CONSOLE_CHART_NAME = admin-console
7-
ADMIN_CONSOLE_CHART_VERSION = 1.109.5
7+
ADMIN_CONSOLE_CHART_VERSION = 1.109.6
88
ADMIN_CONSOLE_IMAGE_OVERRIDE =
99
ADMIN_CONSOLE_MIGRATIONS_IMAGE_OVERRIDE =
1010
EMBEDDED_OPERATOR_CHART_URL = oci://registry.replicated.com/library

e2e/scripts/unsupported-overrides.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ spec:
4646
name: embedded-cluster-operator
4747
namespace: embedded-cluster
4848
order: 2
49-
version: 0.30.1
49+
version: 0.32.2
5050
- chartname: oci://registry.replicated.com/library/admin-console
5151
name: admin-console
5252
namespace: kotsadm

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ require (
1414
github.com/jedib0t/go-pretty v4.3.0+incompatible
1515
github.com/k0sproject/dig v0.2.0
1616
github.com/k0sproject/k0s v1.29.5-0.20240418091920-5421d2dc4754
17-
github.com/replicatedhq/embedded-cluster-kinds v1.2.1
18-
github.com/replicatedhq/embedded-cluster-operator v0.31.1
17+
github.com/replicatedhq/embedded-cluster-kinds v1.2.2
18+
github.com/replicatedhq/embedded-cluster-operator v0.31.2
1919
github.com/replicatedhq/embedded-cluster-utils v1.0.0
20-
github.com/replicatedhq/kotskinds v0.0.0-20230724164735-f83482cc9cfe
20+
github.com/replicatedhq/kotskinds v0.0.0-20240523174825-f4d441adb453
2121
github.com/replicatedhq/troubleshoot v0.92.1
2222
github.com/sirupsen/logrus v1.9.3
2323
github.com/stretchr/testify v1.9.0
@@ -72,7 +72,7 @@ require (
7272
)
7373

7474
require (
75-
github.com/Masterminds/semver/v3 v3.2.1 // indirect
75+
github.com/Masterminds/semver/v3 v3.2.1
7676
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
7777
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
7878
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
@@ -147,7 +147,7 @@ require (
147147
gopkg.in/macaroon.v2 v2.1.0 // indirect
148148
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
149149
k8s.io/apiextensions-apiserver v0.30.0 // indirect
150-
k8s.io/client-go v0.30.0 // indirect
150+
k8s.io/client-go v0.30.1 // indirect
151151
k8s.io/klog/v2 v2.120.1 // indirect
152152
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
153153
k8s.io/utils v0.0.0-20231121161247-cf03d44ff3cf

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ github.com/ohler55/ojg v1.22.0/go.mod h1:gQhDVpQLqrmnd2eqGAvJtn+NfKoYJbe/A4Sj3/V
222222
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
223223
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
224224
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
225-
github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g=
226-
github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc=
225+
github.com/onsi/ginkgo/v2 v2.17.3 h1:oJcvKpIb7/8uLpDDtnQuf18xVnwKp8DTD7DQ6gTd/MU=
226+
github.com/onsi/ginkgo/v2 v2.17.3/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc=
227227
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
228228
github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0=
229229
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
@@ -251,14 +251,14 @@ github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lne
251251
github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY=
252252
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
253253
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
254-
github.com/replicatedhq/embedded-cluster-kinds v1.2.1 h1:iKRzBVMm4Gc8cbe7pL8D7WR8CXhfec2G7c4ygNSQINM=
255-
github.com/replicatedhq/embedded-cluster-kinds v1.2.1/go.mod h1:QvjFYlRZnXC/szgEqTepB5DoU8v3O+mdxmJi0EoqDGY=
256-
github.com/replicatedhq/embedded-cluster-operator v0.31.1 h1:BD7QwSjjbZYZCpWkVu46spakz+I8UcyiOSIjXRSCNiE=
257-
github.com/replicatedhq/embedded-cluster-operator v0.31.1/go.mod h1:/lvWQrf6zfMLyWYtIN2X1VroiDxNh75ShtgdlKmCa74=
254+
github.com/replicatedhq/embedded-cluster-kinds v1.2.2 h1:KW9fSCTt4xr3MpcCQpgwHcwmZp+mz7uA2JOVR+2TD9Q=
255+
github.com/replicatedhq/embedded-cluster-kinds v1.2.2/go.mod h1:NIwwkFGoNHIxx+5mHRihvQU6RqZ/xt/A5RzaHpBh2ZY=
256+
github.com/replicatedhq/embedded-cluster-operator v0.31.2 h1:2tKn/ec0SoCNym8jUGnfUn1EuvqU5D1rBrk2aWZwcA0=
257+
github.com/replicatedhq/embedded-cluster-operator v0.31.2/go.mod h1:X5qVNdTGZjgGqRPK7UIMw7z72nSzdYPbgsMYHPPUwME=
258258
github.com/replicatedhq/embedded-cluster-utils v1.0.0 h1:Axdni1nYfl5zeOP9g5U79yvN8cRdClyU6hz0wV1Hmdc=
259259
github.com/replicatedhq/embedded-cluster-utils v1.0.0/go.mod h1:4JmMC2CwMCLxq05GEW3XSPPVotqyamAF/omrbB3pH+c=
260-
github.com/replicatedhq/kotskinds v0.0.0-20230724164735-f83482cc9cfe h1:3AJInd06UxzqHmgy8+24CPsT2tYSE0zToJZyuX9q+MA=
261-
github.com/replicatedhq/kotskinds v0.0.0-20230724164735-f83482cc9cfe/go.mod h1:QjhIUu3+OmHZ09u09j3FCoTt8F3BYtQglS+OLmftu9I=
260+
github.com/replicatedhq/kotskinds v0.0.0-20240523174825-f4d441adb453 h1:g8CQQ9R4gjIdoHuBX1LN1hmF3Omq2JfA040JfpfNVC8=
261+
github.com/replicatedhq/kotskinds v0.0.0-20240523174825-f4d441adb453/go.mod h1:QjhIUu3+OmHZ09u09j3FCoTt8F3BYtQglS+OLmftu9I=
262262
github.com/replicatedhq/troubleshoot v0.92.1 h1:TjO/NGM/TZRim2chVbW2mGbVbyOZ/qV8KBeApJwdqUc=
263263
github.com/replicatedhq/troubleshoot v0.92.1/go.mod h1:aPdpP2+V8HCHt3V6ozdeAcMAifzOQqN1siQ5Pc5XY0w=
264264
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
@@ -491,8 +491,8 @@ k8s.io/apiextensions-apiserver v0.30.0 h1:jcZFKMqnICJfRxTgnC4E+Hpcq8UEhT8B2lhBcQ
491491
k8s.io/apiextensions-apiserver v0.30.0/go.mod h1:N9ogQFGcrbWqAY9p2mUAL5mGxsLqwgtUce127VtRX5Y=
492492
k8s.io/apimachinery v0.30.1 h1:ZQStsEfo4n65yAdlGTfP/uSHMQSoYzU/oeEbkmF7P2U=
493493
k8s.io/apimachinery v0.30.1/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
494-
k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ=
495-
k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY=
494+
k8s.io/client-go v0.30.1 h1:uC/Ir6A3R46wdkgCV3vbLyNOYyCJ8oZnjtJGKfytl/Q=
495+
k8s.io/client-go v0.30.1/go.mod h1:wrAqLNs2trwiCH/wxxmT/x3hKVH9PuV0GGW0oDoHVqc=
496496
k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
497497
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
498498
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=

pkg/addons/applier.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ func (a *Applier) load() ([]AddOn, error) {
267267
}
268268
addons = append(addons, embedoperator)
269269

270-
snapshotsEnabled, err := helpers.SnapshotsEnabled(a.licenseFile)
270+
disasterRecoveryEnabled, err := helpers.DisasterRecoveryEnabled(a.licenseFile)
271271
if err != nil {
272-
return nil, fmt.Errorf("unable to check if snapshots are enabled: %w", err)
272+
return nil, fmt.Errorf("unable to check if disaster recovery is enabled: %w", err)
273273
}
274-
vel, err := velero.New(defaults.VeleroNamespace, snapshotsEnabled, a.proxyEnv)
274+
vel, err := velero.New(defaults.VeleroNamespace, disasterRecoveryEnabled, a.proxyEnv)
275275
if err != nil {
276276
return nil, fmt.Errorf("unable to create velero addon: %w", err)
277277
}

pkg/addons/embeddedclusteroperator/embeddedclusteroperator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (e *EmbeddedClusterOperator) Outro(ctx context.Context, cli client.Client)
213213
EndUserK0sConfigOverrides: euOverrides,
214214
BinaryName: defaults.BinaryName(),
215215
LicenseInfo: &embeddedclusterv1beta1.LicenseInfo{
216-
IsSnapshotSupported: licenseSnapshotSupported(license),
216+
IsDisasterRecoverySupported: licenseDisasterRecoverySupported(license),
217217
},
218218
},
219219
}
@@ -236,9 +236,9 @@ func New(endUserConfig *embeddedclusterv1beta1.Config, licenseFile string, airga
236236
}, nil
237237
}
238238

239-
func licenseSnapshotSupported(license *kotsv1beta1.License) bool {
239+
func licenseDisasterRecoverySupported(license *kotsv1beta1.License) bool {
240240
if license == nil {
241241
return false
242242
}
243-
return license.Spec.IsSnapshotSupported
243+
return license.Spec.IsDisasterRecoverySupported
244244
}

pkg/helpers/snapshots.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
)
66

7-
func SnapshotsEnabled(licenseFile string) (bool, error) {
7+
func DisasterRecoveryEnabled(licenseFile string) (bool, error) {
88
if licenseFile == "" {
99
return false, nil
1010
}
@@ -14,8 +14,8 @@ func SnapshotsEnabled(licenseFile string) (bool, error) {
1414
return false, fmt.Errorf("failed to parse license: %w", err)
1515
}
1616

17-
// if the license does not have snapshots enabled, return false
18-
if !lic.Spec.IsSnapshotSupported {
17+
// if the license does not have disaster recovery enabled, return false
18+
if !lic.Spec.IsDisasterRecoverySupported {
1919
return false, nil
2020
}
2121

0 commit comments

Comments
 (0)