Skip to content

Commit

Permalink
Replace usages of deprecated pointer functions (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
ialidzhikov authored Feb 9, 2024
1 parent 4e418c6 commit 24daf99
Show file tree
Hide file tree
Showing 22 changed files with 215 additions and 289 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
k8s.io/client-go v0.28.3
k8s.io/code-generator v0.28.3
k8s.io/component-base v0.28.3
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
sigs.k8s.io/controller-runtime v0.16.3
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -912,8 +912,8 @@ k8s.io/metrics v0.28.3 h1:w2s3kVi7HulXqCVDFkF4hN/OsL1tXTTb4Biif995h/g=
k8s.io/metrics v0.28.3/go.mod h1:OZZ23AHFojPzU6r3xoHGRUcV3I9pauLua+07sAUbwLc=
k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
8 changes: 4 additions & 4 deletions pkg/admission/validator/cache/shoot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/gardener/gardener-extension-registry-cache/pkg/admission/validator/cache"
Expand Down Expand Up @@ -252,7 +252,7 @@ var _ = Describe("Shoot validator", func() {
Namespace: "garden-tst",
Name: "ro-docker-creds",
},
Immutable: pointer.Bool(true),
Immutable: ptr.To(true),
Data: map[string][]byte{
"username": []byte("john"),
"password": []byte("swordfish"),
Expand All @@ -279,7 +279,7 @@ var _ = Describe("Shoot validator", func() {
Volume: &v1alpha2.Volume{
Size: &size,
},
SecretReferenceName: pointer.String("docker-creds"),
SecretReferenceName: ptr.To("docker-creds"),
},
},
}),
Expand Down Expand Up @@ -327,7 +327,7 @@ var _ = Describe("Shoot validator", func() {
})

It("should return err when secret is invalid", func() {
secret.Immutable = pointer.Bool(false)
secret.Immutable = ptr.To(false)
delete(secret.Data, "password")
apiReader.EXPECT().Get(ctx, client.ObjectKey{Namespace: "garden-tst", Name: "ro-docker-creds"}, gomock.AssignableToTypeOf(&corev1.Secret{})).
DoAndReturn(func(_ context.Context, _ client.ObjectKey, obj *corev1.Secret, _ ...client.GetOption) error {
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/registry/helper/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

"github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry"
"github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry/helper"
Expand Down Expand Up @@ -84,6 +84,6 @@ var _ = Describe("Helpers", func() {
Expect(helper.VolumeStorageClassName(cache)).To(Equal(expected))
},
Entry("volume is nil", &registry.RegistryCache{Volume: nil}, nil),
Entry("volume.storageClassname is not nil", &registry.RegistryCache{Volume: &registry.Volume{StorageClassName: pointer.String("foo")}}, pointer.String("foo")),
Entry("volume.storageClassname is not nil", &registry.RegistryCache{Volume: &registry.Volume{StorageClassName: ptr.To("foo")}}, ptr.To("foo")),
)
})
4 changes: 2 additions & 2 deletions pkg/apis/registry/v1alpha1/conversions.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package v1alpha1

import (
conversion "k8s.io/apimachinery/pkg/conversion"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

registry "github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry"
)
Expand All @@ -33,7 +33,7 @@ func Convert_v1alpha1_RegistryCache_To_registry_RegistryCache(in *RegistryCache,
// To preserve backwards-compatibility we set the StorageClassName field to "default".
// There are already many StatefulSets created according to the v1alpha1 RegistryConfig and for the the registry-cache extension set the
// StorageClass name in the StatefulSet to "default". The corresponding StatetulSet field is immutable.
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
}

return nil
Expand Down
14 changes: 7 additions & 7 deletions pkg/apis/registry/v1alpha1/conversions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
. "github.com/onsi/gomega"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

"github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry"
"github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry/v1alpha1"
Expand Down Expand Up @@ -49,7 +49,7 @@ var _ = Describe("Conversions", func() {
GarbageCollection: &v1alpha1.GarbageCollection{
Enabled: true,
},
SecretReferenceName: pointer.String("docker-credentials"),
SecretReferenceName: ptr.To("docker-credentials"),
},
},
}
Expand All @@ -63,12 +63,12 @@ var _ = Describe("Conversions", func() {
Upstream: "docker.io",
Volume: &registry.Volume{
Size: &size,
StorageClassName: pointer.String("default"),
StorageClassName: ptr.To("default"),
},
GarbageCollection: &registry.GarbageCollection{
Enabled: true,
},
SecretReferenceName: pointer.String("docker-credentials"),
SecretReferenceName: ptr.To("docker-credentials"),
},
},
}
Expand All @@ -85,13 +85,13 @@ var _ = Describe("Conversions", func() {
GarbageCollection: &registry.GarbageCollection{
Enabled: true,
},
SecretReferenceName: pointer.String("docker-credentials"),
SecretReferenceName: ptr.To("docker-credentials"),
},
{
Upstream: "quay.io",
Volume: &registry.Volume{
Size: &size,
StorageClassName: pointer.String("premium"),
StorageClassName: ptr.To("premium"),
},
},
},
Expand All @@ -107,7 +107,7 @@ var _ = Describe("Conversions", func() {
GarbageCollection: &v1alpha1.GarbageCollection{
Enabled: true,
},
SecretReferenceName: pointer.String("docker-credentials"),
SecretReferenceName: ptr.To("docker-credentials"),
},
{
Upstream: "quay.io",
Expand Down
10 changes: 5 additions & 5 deletions pkg/apis/registry/validation/validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation/field"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"

api "github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry"
. "github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry/validation"
Expand Down Expand Up @@ -198,13 +198,13 @@ var _ = Describe("Validation", func() {
})

It("should deny cache volume storageClassName update", func() {
registryConfig.Caches[0].Volume.StorageClassName = pointer.String("foo")
registryConfig.Caches[0].Volume.StorageClassName = ptr.To("foo")

Expect(ValidateRegistryConfigUpdate(oldRegistryConfig, registryConfig, fldPath)).To(ConsistOf(
PointTo(MatchFields(IgnoreExtras, Fields{
"Type": Equal(field.ErrorTypeInvalid),
"Field": Equal("providerConfig.caches[0].volume.storageClassName"),
"BadValue": Equal(pointer.String("foo")),
"BadValue": Equal(ptr.To("foo")),
"Detail": Equal("field is immutable"),
})),
))
Expand Down Expand Up @@ -242,7 +242,7 @@ var _ = Describe("Validation", func() {
"username": []byte("john"),
"password": []byte("swordfish"),
},
Immutable: pointer.Bool(true),
Immutable: ptr.To(true),
}
})

Expand All @@ -263,7 +263,7 @@ var _ = Describe("Validation", func() {
))
},
Entry("when immutable field is nil", nil),
Entry("when immutable field is false", pointer.Bool(false)),
Entry("when immutable field is false", ptr.To(false)),
)

DescribeTable("should have only two data entries",
Expand Down
8 changes: 4 additions & 4 deletions pkg/component/registrycaches/registry_caches.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import (
"k8s.io/apimachinery/pkg/util/intstr"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
vpaautoscalingv1 "k8s.io/autoscaler/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

api "github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry"
Expand Down Expand Up @@ -181,7 +181,7 @@ func (r *registryCaches) computeResourcesData(ctx context.Context) (map[string][
Name: serviceAccountName,
Namespace: metav1.NamespaceSystem,
},
AutomountServiceAccountToken: pointer.Bool(false),
AutomountServiceAccountToken: ptr.To(false),
}
podSecurityPolicy := &policyv1beta1.PodSecurityPolicy{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -356,7 +356,7 @@ func (r *registryCaches) computeResourcesDataForRegistryCache(ctx context.Contex
Selector: &metav1.LabelSelector{
MatchLabels: getLabels(name, cache.Upstream),
},
Replicas: pointer.Int32(1),
Replicas: ptr.To(int32(1)),
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: utils.MergeStringMaps(getLabels(name, cache.Upstream), map[string]string{
Expand All @@ -365,7 +365,7 @@ func (r *registryCaches) computeResourcesDataForRegistryCache(ctx context.Contex
}),
},
Spec: corev1.PodSpec{
AutomountServiceAccountToken: pointer.Bool(false),
AutomountServiceAccountToken: ptr.To(false),
ServiceAccountName: serviceAccountName,
PriorityClassName: "system-cluster-critical",
SecurityContext: &corev1.PodSecurityContext{
Expand Down
20 changes: 10 additions & 10 deletions pkg/component/registrycaches/registry_caches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"

Expand Down Expand Up @@ -86,7 +86,7 @@ var _ = Describe("RegistryCaches", func() {
Upstream: "europe-docker.pkg.dev",
Volume: &api.Volume{
Size: &arSize,
StorageClassName: pointer.String("premium"),
StorageClassName: ptr.To("premium"),
},
GarbageCollection: &api.GarbageCollection{
Enabled: false,
Expand Down Expand Up @@ -425,12 +425,12 @@ metadata:
Labels: map[string]string{"origin": "registry-cache"},
},
Spec: resourcesv1alpha1.ManagedResourceSpec{
DeletePersistentVolumeClaims: pointer.Bool(true),
DeletePersistentVolumeClaims: ptr.To(true),
InjectLabels: map[string]string{"shoot.gardener.cloud/no-cleanup": "true"},
SecretRefs: []corev1.LocalObjectReference{{
Name: managedResource.Spec.SecretRefs[0].Name,
}},
KeepObjects: pointer.Bool(false),
KeepObjects: ptr.To(false),
},
}
utilruntime.Must(references.InjectAnnotations(expectedMr))
Expand All @@ -439,7 +439,7 @@ metadata:
managedResourceSecret.Name = managedResource.Spec.SecretRefs[0].Name
Expect(c.Get(ctx, client.ObjectKeyFromObject(managedResourceSecret), managedResourceSecret)).To(Succeed())
Expect(managedResourceSecret.Type).To(Equal(corev1.SecretTypeOpaque))
Expect(managedResourceSecret.Immutable).To(Equal(pointer.Bool(true)))
Expect(managedResourceSecret.Immutable).To(Equal(ptr.To(true)))
Expect(managedResourceSecret.Labels["resources.gardener.cloud/garbage-collectable-reference"]).To(Equal("true"))

Expect(managedResourceSecret.Data).To(HaveLen(8))
Expand All @@ -455,7 +455,7 @@ metadata:
arConfigSecret := configSecretYAMLFor(arConfigSecretName, "registry-europe-docker-pkg-dev", "europe-docker.pkg.dev", configYAMLFor("https://europe-docker.pkg.dev", false, "", ""))
Expect(string(managedResourceSecret.Data["secret__kube-system__"+arConfigSecretName+".yaml"])).To(Equal(arConfigSecret))
Expect(string(managedResourceSecret.Data["service__kube-system__registry-europe-docker-pkg-dev.yaml"])).To(Equal(serviceYAMLFor("registry-europe-docker-pkg-dev", "europe-docker.pkg.dev")))
arStatefulSet := statefulSetYAMLFor("registry-europe-docker-pkg-dev", "europe-docker.pkg.dev", "https://europe-docker.pkg.dev", "20Gi", arConfigSecretName, "default", pointer.String("premium"))
arStatefulSet := statefulSetYAMLFor("registry-europe-docker-pkg-dev", "europe-docker.pkg.dev", "https://europe-docker.pkg.dev", "20Gi", arConfigSecretName, "default", ptr.To("premium"))
Expect(string(managedResourceSecret.Data["statefulset__kube-system__registry-europe-docker-pkg-dev.yaml"])).To(Equal(arStatefulSet))
Expect(string(managedResourceSecret.Data["verticalpodautoscaler__kube-system__registry-europe-docker-pkg-dev.yaml"])).To(Equal(vpaYAMLFor("registry-europe-docker-pkg-dev")))
})
Expand Down Expand Up @@ -500,7 +500,7 @@ metadata:
dockerStatefulSet := statefulSetYAMLFor("registry-docker-io", "docker.io", "https://registry-1.docker.io", "10Gi", dockerConfigSecretName, "registry-cache", nil)
Expect(string(managedResourceSecret.Data["statefulset__kube-system__registry-docker-io.yaml"])).To(Equal(dockerStatefulSet))
arConfigSecretName := "registry-europe-docker-pkg-dev-config-902c1c88"
arStatefulSet := statefulSetYAMLFor("registry-europe-docker-pkg-dev", "europe-docker.pkg.dev", "https://europe-docker.pkg.dev", "20Gi", arConfigSecretName, "registry-cache", pointer.String("premium"))
arStatefulSet := statefulSetYAMLFor("registry-europe-docker-pkg-dev", "europe-docker.pkg.dev", "https://europe-docker.pkg.dev", "20Gi", arConfigSecretName, "registry-cache", ptr.To("premium"))
Expect(string(managedResourceSecret.Data["statefulset__kube-system__registry-europe-docker-pkg-dev.yaml"])).To(Equal(arStatefulSet))
})
})
Expand Down Expand Up @@ -536,8 +536,8 @@ metadata:
{Name: "docker-ref", ResourceRef: autoscalingv1.CrossVersionObjectReference{Name: "docker-creds", Kind: "Secret"}},
{Name: "ar-ref", ResourceRef: autoscalingv1.CrossVersionObjectReference{Name: "ar-creds", Kind: "Secret"}},
}
values.Caches[0].SecretReferenceName = pointer.String("docker-ref")
values.Caches[1].SecretReferenceName = pointer.String("ar-ref")
values.Caches[0].SecretReferenceName = ptr.To("docker-ref")
values.Caches[1].SecretReferenceName = ptr.To("ar-ref")
})

JustBeforeEach(func() {
Expand Down Expand Up @@ -569,7 +569,7 @@ metadata:
arConfigSecret := configSecretYAMLFor(arConfigSecretName, "registry-europe-docker-pkg-dev", "europe-docker.pkg.dev", configYAMLFor("https://europe-docker.pkg.dev", false, "ar-user", `{"foo":"bar"}`))
Expect(string(managedResourceSecret.Data["secret__kube-system__"+arConfigSecretName+".yaml"])).To(Equal(arConfigSecret))
Expect(string(managedResourceSecret.Data["service__kube-system__registry-europe-docker-pkg-dev.yaml"])).To(Equal(serviceYAMLFor("registry-europe-docker-pkg-dev", "europe-docker.pkg.dev")))
arStatefulSet := statefulSetYAMLFor("registry-europe-docker-pkg-dev", "europe-docker.pkg.dev", "https://europe-docker.pkg.dev", "20Gi", arConfigSecretName, "default", pointer.String("premium"))
arStatefulSet := statefulSetYAMLFor("registry-europe-docker-pkg-dev", "europe-docker.pkg.dev", "https://europe-docker.pkg.dev", "20Gi", arConfigSecretName, "default", ptr.To("premium"))
Expect(string(managedResourceSecret.Data["statefulset__kube-system__registry-europe-docker-pkg-dev.yaml"])).To(Equal(arStatefulSet))
Expect(string(managedResourceSecret.Data["verticalpodautoscaler__kube-system__registry-europe-docker-pkg-dev.yaml"])).To(Equal(vpaYAMLFor("registry-europe-docker-pkg-dev")))
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

"github.com/gardener/gardener-extension-registry-cache/pkg/constants"
Expand Down Expand Up @@ -127,7 +127,7 @@ func (r *registryConfigurationCleaner) computeResourcesData() (map[string][]byte
Name: serviceAccountName,
Namespace: metav1.NamespaceSystem,
},
AutomountServiceAccountToken: pointer.Bool(false),
AutomountServiceAccountToken: ptr.To(false),
}
podSecurityPolicy := &policyv1beta1.PodSecurityPolicy{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -219,7 +219,7 @@ func (r *registryConfigurationCleaner) computeResourcesData() (map[string][]byte
Labels: getLabels(),
},
Spec: corev1.PodSpec{
AutomountServiceAccountToken: pointer.Bool(false),
AutomountServiceAccountToken: ptr.To(false),
ServiceAccountName: serviceAccountName,
PriorityClassName: v1beta1constants.PriorityClassNameShootSystem700,
SecurityContext: &corev1.PodSecurityContext{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"
fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"

Expand Down Expand Up @@ -126,7 +126,7 @@ var _ = Describe("RegistryConfigurationCleaner", func() {
SecretRefs: []corev1.LocalObjectReference{{
Name: managedResource.Spec.SecretRefs[0].Name,
}},
KeepObjects: pointer.Bool(false),
KeepObjects: ptr.To(false),
},
}
utilruntime.Must(references.InjectAnnotations(expectedMr))
Expand All @@ -135,7 +135,7 @@ var _ = Describe("RegistryConfigurationCleaner", func() {
managedResourceSecret.Name = managedResource.Spec.SecretRefs[0].Name
Expect(c.Get(ctx, client.ObjectKeyFromObject(managedResourceSecret), managedResourceSecret)).To(Succeed())
Expect(managedResourceSecret.Type).To(Equal(corev1.SecretTypeOpaque))
Expect(managedResourceSecret.Immutable).To(Equal(pointer.Bool(true)))
Expect(managedResourceSecret.Immutable).To(Equal(ptr.To(true)))
Expect(managedResourceSecret.Labels["resources.gardener.cloud/garbage-collectable-reference"]).To(Equal("true"))
if pspDisabled {
Expect(managedResourceSecret.Data).To(HaveLen(1))
Expand Down
8 changes: 4 additions & 4 deletions pkg/webhook/cache/ensurer.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"github.com/go-logr/logr"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/utils/pointer"
"k8s.io/utils/ptr"
"sigs.k8s.io/controller-runtime/pkg/client"

api "github.com/gardener/gardener-extension-registry-cache/pkg/apis/registry"
Expand Down Expand Up @@ -61,7 +61,7 @@ type ensurer struct {
func (e *ensurer) EnsureAdditionalFiles(_ context.Context, _ gcontext.GardenContext, new, _ *[]extensionsv1alpha1.File) error {
*new = extensionswebhook.EnsureFileWithPath(*new, extensionsv1alpha1.File{
Path: "/opt/bin/configure-containerd-registries.sh",
Permissions: pointer.Int32(0744),
Permissions: ptr.To(int32(0744)),
Content: extensionsv1alpha1.FileContent{
Inline: &extensionsv1alpha1.FileContentInline{
Encoding: "b64",
Expand Down Expand Up @@ -119,8 +119,8 @@ func (e *ensurer) EnsureAdditionalUnits(ctx context.Context, gctx gcontext.Garde
unit := extensionsv1alpha1.Unit{
Name: "configure-containerd-registries.service",
Command: extensionsv1alpha1.UnitCommandPtr(extensionsv1alpha1.CommandStart),
Enable: pointer.Bool(true),
Content: pointer.String(`[Unit]
Enable: ptr.To(true),
Content: ptr.To(`[Unit]
Description=Configures containerd registries
[Install]
Expand Down
Loading

0 comments on commit 24daf99

Please sign in to comment.