Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DOCKER_REPO ?= docker.io/
IMAGE ?= $(USER)/tomcat-operator
TAG ?= v0.0.3
TAG ?= $(shell git rev-parse HEAD)
PROG := tomcat-operator

.DEFAULT_GOAL := help
Expand All @@ -25,6 +25,11 @@ build: tidy unit-test
## image Create the Docker image of the operator
image: build
docker build -t "$(DOCKER_REPO)$(IMAGE):$(TAG)" . -f build/Dockerfile
$(MAKE) tag

## tag Tag the image as latest
tag:
docker tag "$(DOCKER_REPO)$(IMAGE):$(TAG)" "$(DOCKER_REPO)$(IMAGE):latest"

## push Push Docker image to the docker.io repository.
push: image
Expand Down
2 changes: 1 addition & 1 deletion deploy/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
containers:
- name: tomcat-operator
# Replace this with the built image name
image: docker.io/jfclere/tomcat-operator:v0.0.3
image: docker.io/jfclere/tomcat-operator:latest
command:
- tomcat-operator
imagePullPolicy: IfNotPresent
Expand Down
1 change: 1 addition & 0 deletions pkg/controller/tomcat/tomcat_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ func (r *ReconcileTomcat) deploymentForTomcat(t *tomcatv1alpha1.Tomcat) *appsv1.
InitContainers: []corev1.Container{{
Name: "war",
Image: t.Spec.WebArchiveImage,
ImagePullPolicy: "IfNotPresent",
Command: []string{
"./mavenbuilder.sh",
t.Spec.WebAppURL,
Expand Down