Merge "Fix for Templater latest image"
This commit is contained in:
commit
c55258f6cb
5
Makefile
5
Makefile
@ -170,13 +170,10 @@ ifeq ($(PUBLISH), true)
|
||||
@docker push $(DOCKER_IMAGE)
|
||||
endif
|
||||
|
||||
# Use specific Dockerfile instead of general one to make image for kubeval-validator and toolbox
|
||||
docker-image-toolbox: DOCKER_CMD_FLAGS+=-f krm-functions/toolbox/Dockerfile
|
||||
docker-image-kubeval-validator: DOCKER_CMD_FLAGS+=-f krm-functions/kubeval-validator/image/Dockerfile
|
||||
.PHONY: $(PLUGINS_IMAGE_TGT)
|
||||
$(PLUGINS_IMAGE_TGT):
|
||||
$(eval plugin_name=$(subst docker-image-,,$@))
|
||||
@docker build . $(DOCKER_CMD_FLAGS) \
|
||||
@docker build $(PLUGINS_DIR)/$(plugin_name) $(DOCKER_CMD_FLAGS) \
|
||||
--label $(LABEL) \
|
||||
--label "org.opencontainers.image.revision=$(COMMIT)" \
|
||||
--label "org.opencontainers.image.created=$(shell date --rfc-3339=seconds --utc)" \
|
||||
|
@ -1,4 +1,6 @@
|
||||
FROM gcr.io/gcp-runtimes/go1-builder:1.15 as builder
|
||||
ARG GO_IMAGE=gcr.io/gcp-runtimes/go1-builder:1.15
|
||||
ARG PLUGINS_RELEASE_IMAGE=alpine:3.12.0
|
||||
FROM ${GO_IMAGE} as builder
|
||||
|
||||
# Inject custom root certificate authorities if needed
|
||||
# Docker does not have a good conditional copy statement and requires that a source file exists
|
||||
@ -14,6 +16,6 @@ RUN /usr/local/go/bin/go mod download
|
||||
COPY main.go .
|
||||
RUN /usr/local/go/bin/go build -v -o /usr/local/bin/config-function ./
|
||||
|
||||
FROM alpine:latest
|
||||
FROM ${PLUGINS_RELEASE_IMAGE} as release
|
||||
COPY --from=builder /usr/local/bin/config-function /usr/local/bin/config-function
|
||||
CMD ["/usr/local/bin/config-function"]
|
@ -19,45 +19,44 @@ USE_PROXY ?= false
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
(cd image && go build -v -o $(GOBIN)/config-function .)
|
||||
(go build -v -o $(GOBIN)/config-function .)
|
||||
|
||||
.PHONY: all
|
||||
all: generate license build fix vet fmt test lint tidy
|
||||
|
||||
.PHONY: fix
|
||||
fix:
|
||||
(cd image && go fix ./...)
|
||||
(go fix .)
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
(cd image && go fmt ./...)
|
||||
(go fmt .)
|
||||
|
||||
.PHONY: generate
|
||||
generate:
|
||||
(which $(GOBIN)/mdtogo || go get sigs.k8s.io/kustomize/cmd/mdtogo)
|
||||
(cd image && GOBIN=$(GOBIN) go generate ./...)
|
||||
(GOBIN=$(GOBIN) go generate .)
|
||||
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
(cd image && go mod tidy)
|
||||
(go mod tidy)
|
||||
|
||||
.PHONY: fix
|
||||
lint:
|
||||
(which $(GOBIN)/golangci-lint || go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1)
|
||||
(cd image && $(GOBIN)/golangci-lint run ./...)
|
||||
($(GOBIN)/golangci-lint run .)
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
(cd image && go test -cover ./...)
|
||||
(go test -cover .)
|
||||
|
||||
.PHONY: vet
|
||||
vet:
|
||||
(cd image && go vet ./...)
|
||||
(go vet .)
|
||||
|
||||
.PHONY: image
|
||||
image:
|
||||
ifeq ($(USE_PROXY), true)
|
||||
cd image && \
|
||||
docker build . --network=host \
|
||||
--build-arg http_proxy=$(PROXY) \
|
||||
--build-arg https_proxy=$(PROXY) \
|
||||
@ -68,7 +67,6 @@ ifeq ($(USE_PROXY), true)
|
||||
--tag $(DOCKER_IMAGE) \
|
||||
--force-rm=$(DOCKER_FORCE_CLEAN)
|
||||
else
|
||||
cd image && \
|
||||
docker build . --network=host \
|
||||
--tag $(DOCKER_IMAGE) \
|
||||
--force-rm=$(DOCKER_FORCE_CLEAN)
|
||||
|
6
krm-functions/cloud-init/certs/README.md
Executable file
6
krm-functions/cloud-init/certs/README.md
Executable file
@ -0,0 +1,6 @@
|
||||
# Additional Docker image root certificate authorities
|
||||
If you require additional certificate authorities for your Docker image:
|
||||
* Add ASCII PEM encoded .crt files to this directory
|
||||
* The files will be copied into your docker image at build time.
|
||||
|
||||
To update manually copy the .crt files to /usr/local/share/ca-certificates/ and run sudo update-ca-certificates.
|
@ -3,7 +3,7 @@ module opendev.org/airship/airshipctl/functions/cloud-init/image
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
opendev.org/airship/airshipctl v0.0.0-20210217205206-b8a4b6ad734c
|
||||
opendev.org/airship/airshipctl v0.0.0-20210421143147-014e24cd1591
|
||||
sigs.k8s.io/kustomize/kyaml v0.10.0
|
||||
sigs.k8s.io/kustomize/api v0.7.2
|
||||
)
|
||||
|
@ -4,10 +4,10 @@ FROM ${GO_IMAGE} as function
|
||||
ENV PATH "/usr/local/go/bin:$PATH"
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY krm-functions/kubeval-validator/image/go.mod .
|
||||
COPY krm-functions/kubeval-validator/image/go.sum .
|
||||
COPY image/go.mod .
|
||||
COPY image/go.sum .
|
||||
RUN go mod download
|
||||
COPY krm-functions/kubeval-validator/image/main.go .
|
||||
COPY image/main.go .
|
||||
RUN go build -v -o /usr/local/bin/config-function ./
|
||||
|
||||
FROM ${PLUGINS_RELEASE_IMAGE} as release
|
||||
@ -24,5 +24,5 @@ RUN echo "**** install Python ****" && \
|
||||
|
||||
RUN pip3 install 'ruamel.yaml==0.16.13' 'openapi2jsonschema==0.9.0' openapi-spec-validator
|
||||
COPY --from=function /usr/local/bin/config-function /usr/local/bin/config-function
|
||||
COPY krm-functions/kubeval-validator/image/extract-openapi.py /usr/local/bin/
|
||||
COPY image/extract-openapi.py /usr/local/bin/
|
||||
CMD ["config-function"]
|
@ -1,4 +1,6 @@
|
||||
FROM gcr.io/gcp-runtimes/go1-builder:1.15 as builder
|
||||
ARG GO_IMAGE=gcr.io/gcp-runtimes/go1-builder:1.15
|
||||
ARG PLUGINS_RELEASE_IMAGE=alpine:3.12.0
|
||||
FROM ${GO_IMAGE} as builder
|
||||
|
||||
# Inject custom root certificate authorities if needed
|
||||
# Docker does not have a good conditional copy statement and requires that a source file exists
|
||||
@ -14,6 +16,6 @@ RUN /usr/local/go/bin/go mod download
|
||||
COPY main.go .
|
||||
RUN /usr/local/go/bin/go build -v -o /usr/local/bin/config-function ./
|
||||
|
||||
FROM alpine:latest
|
||||
FROM ${PLUGINS_RELEASE_IMAGE} as release
|
||||
COPY --from=builder /usr/local/bin/config-function /usr/local/bin/config-function
|
||||
CMD ["/usr/local/bin/config-function"]
|
@ -19,45 +19,44 @@ USE_PROXY ?= false
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
(cd image && go build -v -o $(GOBIN)/config-function .)
|
||||
(go build -v -o $(GOBIN)/config-function .)
|
||||
|
||||
.PHONY: all
|
||||
all: generate license build fix vet fmt test lint tidy
|
||||
|
||||
.PHONY: fix
|
||||
fix:
|
||||
(cd image && go fix ./...)
|
||||
(go fix .)
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
(cd image && go fmt ./...)
|
||||
(go fmt .)
|
||||
|
||||
.PHONY: generate
|
||||
generate:
|
||||
(which $(GOBIN)/mdtogo || go get sigs.k8s.io/kustomize/cmd/mdtogo)
|
||||
(cd image && GOBIN=$(GOBIN) go generate ./...)
|
||||
(GOBIN=$(GOBIN) go generate .)
|
||||
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
(cd image && go mod tidy)
|
||||
(go mod tidy)
|
||||
|
||||
.PHONY: fix
|
||||
lint:
|
||||
(which $(GOBIN)/golangci-lint || go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1)
|
||||
(cd image && $(GOBIN)/golangci-lint run ./...)
|
||||
($(GOBIN)/golangci-lint run .)
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
(cd image && go test -cover ./...)
|
||||
(go test -cover .)
|
||||
|
||||
.PHONY: vet
|
||||
vet:
|
||||
(cd image && go vet ./...)
|
||||
(go vet .)
|
||||
|
||||
.PHONY: image
|
||||
image:
|
||||
ifeq ($(USE_PROXY), true)
|
||||
cd image && \
|
||||
docker build . --network=host \
|
||||
--build-arg http_proxy=$(PROXY) \
|
||||
--build-arg https_proxy=$(PROXY) \
|
||||
@ -68,7 +67,6 @@ ifeq ($(USE_PROXY), true)
|
||||
--tag $(DOCKER_IMAGE) \
|
||||
--force-rm=$(DOCKER_FORCE_CLEAN)
|
||||
else
|
||||
cd image && \
|
||||
docker build . --network=host \
|
||||
--tag $(DOCKER_IMAGE) \
|
||||
--force-rm=$(DOCKER_FORCE_CLEAN)
|
||||
|
6
krm-functions/replacement-transformer/certs/README.md
Executable file
6
krm-functions/replacement-transformer/certs/README.md
Executable file
@ -0,0 +1,6 @@
|
||||
# Additional Docker image root certificate authorities
|
||||
If you require additional certificate authorities for your Docker image:
|
||||
* Add ASCII PEM encoded .crt files to this directory
|
||||
* The files will be copied into your docker image at build time.
|
||||
|
||||
To update manually copy the .crt files to /usr/local/share/ca-certificates/ and run sudo update-ca-certificates.
|
@ -3,6 +3,6 @@ module opendev.org/airship/airshipctl/functions/replacement-transformer/image
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
opendev.org/airship/airshipctl v0.0.0-20201007215749-76e4d3f48c5a
|
||||
opendev.org/airship/airshipctl v0.0.0-20210421143147-014e24cd1591
|
||||
sigs.k8s.io/kustomize/kyaml v0.7.1
|
||||
)
|
||||
|
@ -1,4 +1,6 @@
|
||||
FROM gcr.io/gcp-runtimes/go1-builder:1.15 as builder
|
||||
ARG GO_IMAGE=gcr.io/gcp-runtimes/go1-builder:1.15
|
||||
ARG PLUGINS_RELEASE_IMAGE=alpine:3.12.0
|
||||
FROM ${GO_IMAGE} as builder
|
||||
|
||||
# Inject custom root certificate authorities if needed
|
||||
# Docker does not have a good conditional copy statement and requires that a source file exists
|
||||
@ -14,6 +16,6 @@ RUN /usr/local/go/bin/go mod download
|
||||
COPY main.go .
|
||||
RUN /usr/local/go/bin/go build -v -o /usr/local/bin/config-function ./
|
||||
|
||||
FROM alpine:latest
|
||||
FROM ${PLUGINS_RELEASE_IMAGE} as release
|
||||
COPY --from=builder /usr/local/bin/config-function /usr/local/bin/config-function
|
||||
CMD ["/usr/local/bin/config-function"]
|
@ -19,45 +19,44 @@ USE_PROXY ?= false
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
(cd image && go build -v -o $(GOBIN)/config-function .)
|
||||
(go build -v -o $(GOBIN)/config-function .)
|
||||
|
||||
.PHONY: all
|
||||
all: generate license build fix vet fmt test lint tidy
|
||||
|
||||
.PHONY: fix
|
||||
fix:
|
||||
(cd image && go fix ./...)
|
||||
(go fix .)
|
||||
|
||||
.PHONY: fmt
|
||||
fmt:
|
||||
(cd image && go fmt ./...)
|
||||
(go fmt .)
|
||||
|
||||
.PHONY: generate
|
||||
generate:
|
||||
(which $(GOBIN)/mdtogo || go get sigs.k8s.io/kustomize/cmd/mdtogo)
|
||||
(cd image && GOBIN=$(GOBIN) go generate ./...)
|
||||
(GOBIN=$(GOBIN) go generate .)
|
||||
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
(cd image && go mod tidy)
|
||||
(go mod tidy)
|
||||
|
||||
.PHONY: fix
|
||||
lint:
|
||||
(which $(GOBIN)/golangci-lint || go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.19.1)
|
||||
(cd image && $(GOBIN)/golangci-lint run ./...)
|
||||
($(GOBIN)/golangci-lint run .)
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
(cd image && go test -cover ./...)
|
||||
(go test -cover .)
|
||||
|
||||
.PHONY: vet
|
||||
vet:
|
||||
(cd image && go vet ./...)
|
||||
(go vet .)
|
||||
|
||||
.PHONY: image
|
||||
image:
|
||||
ifeq ($(USE_PROXY), true)
|
||||
cd image && \
|
||||
docker build . --network=host \
|
||||
--build-arg http_proxy=$(PROXY) \
|
||||
--build-arg https_proxy=$(PROXY) \
|
||||
@ -68,7 +67,6 @@ ifeq ($(USE_PROXY), true)
|
||||
--tag $(DOCKER_IMAGE) \
|
||||
--force-rm=$(DOCKER_FORCE_CLEAN)
|
||||
else
|
||||
cd image && \
|
||||
docker build . --network=host \
|
||||
--tag $(DOCKER_IMAGE) \
|
||||
--force-rm=$(DOCKER_FORCE_CLEAN)
|
||||
|
6
krm-functions/templater/certs/README.md
Executable file
6
krm-functions/templater/certs/README.md
Executable file
@ -0,0 +1,6 @@
|
||||
# Additional Docker image root certificate authorities
|
||||
If you require additional certificate authorities for your Docker image:
|
||||
* Add ASCII PEM encoded .crt files to this directory
|
||||
* The files will be copied into your docker image at build time.
|
||||
|
||||
To update manually copy the .crt files to /usr/local/share/ca-certificates/ and run sudo update-ca-certificates.
|
@ -3,6 +3,6 @@ module opendev.org/airship/airshipctl/functions/templater/image
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
opendev.org/airship/airshipctl v0.0.0-20201007215749-76e4d3f48c5a
|
||||
opendev.org/airship/airshipctl v0.0.0-20210421143147-014e24cd1591
|
||||
sigs.k8s.io/kustomize/kyaml v0.7.1
|
||||
)
|
||||
|
@ -20,9 +20,9 @@ RUN chmod +x /kubectl /calicoctl
|
||||
FROM ${GO_IMAGE} as builder
|
||||
ENV CGO_ENABLED=0
|
||||
WORKDIR /go/src/
|
||||
COPY krm-functions/toolbox/image/go.mod .
|
||||
COPY image/go.mod .
|
||||
RUN /usr/local/go/bin/go mod download
|
||||
COPY krm-functions/toolbox/main.go .
|
||||
COPY main.go .
|
||||
RUN /usr/local/go/bin/go build -v -o /usr/local/bin/config-function ./
|
||||
|
||||
FROM ${PLUGINS_RELEASE_IMAGE} as release
|
||||
|
6
krm-functions/toolbox/certs/README.md
Executable file
6
krm-functions/toolbox/certs/README.md
Executable file
@ -0,0 +1,6 @@
|
||||
# Additional Docker image root certificate authorities
|
||||
If you require additional certificate authorities for your Docker image:
|
||||
* Add ASCII PEM encoded .crt files to this directory
|
||||
* The files will be copied into your docker image at build time.
|
||||
|
||||
To update manually copy the .crt files to /usr/local/share/ca-certificates/ and run sudo update-ca-certificates.
|
Loading…
Reference in New Issue
Block a user