Skip to content

Commit 60baf9a

Browse files
authored
Merge pull request #4 from rsmitty/master
This PR updates the talos import so we can ensure we've got the latestmachine config generation logic
2 parents 634f409 + 78ea214 commit 60baf9a

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ FROM test AS build
3434
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
3535

3636
# Copy the controller-manager into a thin image
37-
FROM scratch
37+
FROM gcr.io/distroless/static:latest
3838
WORKDIR /
3939
COPY --from=build /go/src/github.com/talos-systems/cluster-api-bootstrap-provider-talos/manager .
4040
ENTRYPOINT ["/manager"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
TAG ?= $(shell gitmeta image tag)
2-
REPO ?= autonomy/cluster-api-provider-talos
2+
REPO ?= autonomy/cluster-api-talos-controller
33

44

55
# Image URL to use all building/pushing image targets

controllers/talosconfig_controller.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"encoding/base64"
2121
"errors"
2222
"fmt"
23+
"strconv"
2324

2425
"github.com/go-logr/logr"
2526
bootstrapv1alpha2 "github.com/talos-systems/cluster-api-bootstrap-provider-talos/api/v1alpha2"
@@ -136,7 +137,11 @@ func (r *TalosConfigReconciler) Reconcile(req ctrl.Request) (_ ctrl.Result, rerr
136137
machineType = generate.TypeControlPlane
137138
}
138139

139-
input, err := generate.NewInput(cluster.ObjectMeta.Name, "https://"+cluster.Status.APIEndpoints[0].Host+":443", *machine.Spec.Version)
140+
APIEndpointPort := strconv.Itoa(cluster.Status.APIEndpoints[0].Port)
141+
input, err := generate.NewInput(cluster.ObjectMeta.Name,
142+
"https://"+cluster.Status.APIEndpoints[0].Host+":"+APIEndpointPort,
143+
*machine.Spec.Version,
144+
)
140145
if err != nil {
141146
return ctrl.Result{}, err
142147
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/go-logr/logr v0.1.0
77
github.com/onsi/ginkgo v1.8.0
88
github.com/onsi/gomega v1.5.0
9-
github.com/talos-systems/talos v0.3.0-alpha.1.0.20191016174505-d0111fe617bb
9+
github.com/talos-systems/talos v0.3.0-alpha.4
1010
gopkg.in/yaml.v2 v2.2.2
1111
k8s.io/api v0.0.0-20190918195907-bd6ac527cfd2
1212
k8s.io/apimachinery v0.0.0-20190913080033-27d36303b655

go.sum

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,11 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
255255
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
256256
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
257257
github.com/syndtr/gocapability v0.0.0-20180223013746-33e07d32887e/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
258+
github.com/talos-systems/talos v0.2.0 h1:go8501TGzTNzm5InAbcrVGL0tdeU117sIQX8XzIzw34=
258259
github.com/talos-systems/talos v0.3.0-alpha.1.0.20191016174505-d0111fe617bb h1:bzdPYYeeF06h9hgq1PwGjLfV0k/+6cs3eeUFYT/55hM=
259260
github.com/talos-systems/talos v0.3.0-alpha.1.0.20191016174505-d0111fe617bb/go.mod h1:22KcKkZ3l69bN1STZ4g4dzs3FapgnFxnNY8xEQOK694=
261+
github.com/talos-systems/talos v0.3.0-alpha.4 h1:eCIAjzji5cCgIpD8HxWu8qGPnj1gA+y2jEpvfR1vIWg=
262+
github.com/talos-systems/talos v0.3.0-alpha.4/go.mod h1:22KcKkZ3l69bN1STZ4g4dzs3FapgnFxnNY8xEQOK694=
260263
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
261264
github.com/u-root/u-root v6.0.0+incompatible/go.mod h1:RYkpo8pTHrNjW08opNd/U6p/RJE7K0D8fXO0d47+3YY=
262265
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=

0 commit comments

Comments
 (0)