Skip to content

Commit 97dbbe2

Browse files
authored
fix(release): remove operator-init image references (tigera#4554)
1 parent b572c1f commit 97dbbe2

4 files changed

Lines changed: 1 addition & 40 deletions

File tree

Makefile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ CONTAINERIZED= mkdir -p .go-pkg-cache $(GOMOD_CACHE) && \
149149
DOCKER_RUN := $(CONTAINERIZED) $(CALICO_BUILD)
150150

151151
BUILD_IMAGE?=tigera/operator
152-
BUILD_INIT_IMAGE?=tigera/operator-init
153152

154153
BUILD_DIR?=build/_output
155154
BINDIR?=$(BUILD_DIR)/bin
@@ -309,12 +308,6 @@ image-all: $(addprefix sub-image-,$(VALIDARCHES))
309308
sub-image-%:
310309
$(MAKE) images ARCH=$*
311310

312-
.PHONY: image-init
313-
image-init: image
314-
ifeq ($(ARCH),amd64)
315-
docker tag $(BUILD_IMAGE):latest-$(ARCH) $(BUILD_INIT_IMAGE):latest
316-
endif
317-
318311
BINDIR?=build/init/bin
319312
$(BINDIR)/kubectl:
320313
mkdir -p $(BINDIR)

hack/release/build.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,7 @@ var buildAction = cli.ActionFunc(func(ctx context.Context, c *cli.Command) error
229229
image := c.String(imageFlag.Name)
230230
if image != defaultImageName {
231231
buildLog = buildLog.WithField("image", image)
232-
buildEnv = append(buildEnv,
233-
fmt.Sprintf("BUILD_IMAGE=%s", image),
234-
fmt.Sprintf("BUILD_INIT_IMAGE=%s-init", image))
232+
buildEnv = append(buildEnv, fmt.Sprintf("BUILD_IMAGE=%s", image))
235233
}
236234
registry := c.String(registryFlag.Name)
237235
if registry != "" && registry != quayRegistry {

hack/release/from.go

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ func newHashreleaseOperator(dir, version, imageName, registry string, arches []s
169169
}
170170

171171
func buildHashreleaseOperator(dir, version, imageName, registry string, arches []string) error {
172-
initImageName := fmt.Sprintf("%s-init", imageName)
173172
env := os.Environ()
174173
env = append(env, fmt.Sprintf("ARCHES=%s", strings.Join(arches, " ")))
175174
env = append(env, fmt.Sprintf("GIT_VERSION=%s", version))
@@ -190,27 +189,6 @@ func buildHashreleaseOperator(dir, version, imageName, registry string, arches [
190189
}
191190
logrus.WithField("tag", tag).Debug("Built image")
192191
}
193-
194-
env = os.Environ()
195-
env = append(env, fmt.Sprintf("ARCHES=%s", strings.Join(arches, " ")))
196-
env = append(env, fmt.Sprintf("GIT_VERSION=%s", version))
197-
env = append(env, fmt.Sprintf("BUILD_IMAGE=%s", imageName))
198-
env = append(env, fmt.Sprintf("BUILD_INIT_IMAGE=%s", initImageName))
199-
if out, err := makeInDir(dir, "image-init", env...); err != nil {
200-
logrus.Error(out)
201-
return fmt.Errorf("building init image: %w", err)
202-
}
203-
204-
initTag := fmt.Sprintf("%s/%s:%s", registry, initImageName, version)
205-
if out, err := runCommand("docker", []string{
206-
"tag",
207-
fmt.Sprintf("%s:latest", initImageName),
208-
fmt.Sprintf("%s/%s:%s", registry, initImageName, version),
209-
}, env); err != nil {
210-
logrus.Error(out)
211-
return fmt.Errorf("tagging init image: %w", err)
212-
}
213-
logrus.WithField("tag", initTag).Debug("Built init image")
214192
return nil
215193
}
216194

@@ -240,13 +218,6 @@ func publishHashreleaseOperator(version, imageName, registry string, archs []str
240218
return fmt.Errorf("pushing manifest: %w", err)
241219
}
242220
logrus.WithField("image", image).Debug("Pushed manifest")
243-
244-
initImage := fmt.Sprintf("%s/%s-init:%s", registry, imageName, version)
245-
if out, err := runCommand("docker", []string{"push", initImage}, nil); err != nil {
246-
logrus.Error(out)
247-
return fmt.Errorf("pushing init image: %w", err)
248-
}
249-
logrus.WithField("image", initImage).Debug("Pushed init image")
250221
return nil
251222
}
252223

hack/release/publish.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ var publishImages = func(c *cli.Command, repoRootDir string) error {
136136
if image := c.String(imageFlag.Name); image != defaultImageName {
137137
log = log.WithField("image", image)
138138
publishEnv = append(publishEnv, fmt.Sprintf("BUILD_IMAGE=%s", image))
139-
publishEnv = append(publishEnv, fmt.Sprintf("BUILD_INIT_IMAGE=%s-init", image))
140139
}
141140
if registry := c.String(registryFlag.Name); registry != "" && registry != quayRegistry {
142141
log = log.WithField("registry", registry)

0 commit comments

Comments
 (0)