Skip to content

Commit

Permalink
drop the ignitionv2 dep
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl committed Jul 13, 2023
1 parent 06b565a commit 139a3e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"fmt"
"strings"

"github.com/coreos/ignition/v2/config/util"
"github.com/Azure/go-autorest/autorest/to"
mcv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
"github.com/sirupsen/logrus"
kerrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -124,7 +124,7 @@ func makeConfig() mcv1.KubeletConfig {
Name: configName,
},
Spec: mcv1.KubeletConfigSpec{
AutoSizingReserved: util.BoolToPtr(true),
AutoSizingReserved: to.BoolPtr(true),
MachineConfigPoolSelector: &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"testing"

"github.com/coreos/ignition/v2/config/util"
"github.com/Azure/go-autorest/autorest/to"
"github.com/google/go-cmp/cmp"
mcv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -82,7 +82,7 @@ func TestAutosizednodesReconciler(t *testing.T) {
Name: configName,
},
Spec: mcv1.KubeletConfigSpec{
AutoSizingReserved: util.BoolToPtr(false),
AutoSizingReserved: to.BoolPtr(false),
MachineConfigPoolSelector: &metav1.LabelSelector{
MatchExpressions: []metav1.LabelSelectorRequirement{
{
Expand Down
12 changes: 6 additions & 6 deletions pkg/operator/controllers/dnsmasq/dnsmasq.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"fmt"
"text/template"

"github.com/Azure/go-autorest/autorest/to"
ign2types "github.com/coreos/ignition/config/v2_2/types"
ignutil "github.com/coreos/ignition/v2/config/util"
mcv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
"github.com/vincent-petithory/dataurl"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -182,7 +182,7 @@ func ignition2Config(clusterDomain, apiIntIP, ingressIP string, gatewayDomains [
{
Node: ign2types.Node{
Filesystem: "root",
Overwrite: ignutil.BoolToPtr(true),
Overwrite: to.BoolPtr(true),
Path: "/etc/dnsmasq.conf",
User: &ign2types.NodeUser{
Name: "root",
Expand All @@ -192,13 +192,13 @@ func ignition2Config(clusterDomain, apiIntIP, ingressIP string, gatewayDomains [
Contents: ign2types.FileContents{
Source: dataurl.EncodeBytes(config),
},
Mode: ignutil.IntToPtr(0644),
Mode: to.IntPtr(0644),
},
},
{
Node: ign2types.Node{
Filesystem: "root",
Overwrite: ignutil.BoolToPtr(true),
Overwrite: to.BoolPtr(true),
Path: "/usr/local/bin/aro-dnsmasq-pre.sh",
User: &ign2types.NodeUser{
Name: "root",
Expand All @@ -208,7 +208,7 @@ func ignition2Config(clusterDomain, apiIntIP, ingressIP string, gatewayDomains [
Contents: ign2types.FileContents{
Source: dataurl.EncodeBytes(startpre),
},
Mode: ignutil.IntToPtr(0744),
Mode: to.IntPtr(0744),
},
},
},
Expand All @@ -217,7 +217,7 @@ func ignition2Config(clusterDomain, apiIntIP, ingressIP string, gatewayDomains [
Units: []ign2types.Unit{
{
Contents: service,
Enabled: ignutil.BoolToPtr(true),
Enabled: to.BoolPtr(true),
Name: "dnsmasq.service",
},
},
Expand Down

0 comments on commit 139a3e4

Please sign in to comment.