Skip to content

Commit

Permalink
removing kustomize edit image
Browse files Browse the repository at this point in the history
  • Loading branch information
dgkanatsios authored and Dimitris Gkanatsios committed Jun 25, 2022
1 parent 21f7e16 commit 0e25852
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
app: thundernetes-gameserverapi
spec:
containers:
- image: thundernetes-gameserverapi
- image: thundernetes-gameserverapi:${IMAGE_TAG}
name: gameserverapi
imagePullPolicy: IfNotPresent
resources:
Expand Down
5 changes: 2 additions & 3 deletions e2e/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ echo "-----Compiling, building and deploying the operator to local Kubernetes cl
IMG=${IMAGE_NAME_OPERATOR}:${IMAGE_TAG} API_SERVICE_SECURITY=usetls make -C "${DIR}"/../pkg/operator deploye2e

echo "-----Deploying GameServer API-----"
cd cmd/gameserverapi/deploy/default
"${DIR}"/../pkg/operator/bin/kustomize edit set image thundernetes-gameserverapi=thundernetes-gameserverapi:${IMAGE_TAG}
"${DIR}"/../pkg/operator/bin/kustomize build ../e2e | kubectl apply -f -
cd cmd/gameserverapi/deployment/default
"${DIR}"/../pkg/operator/bin/kustomize build ../e2e | IMAGE_TAG=${IMAGE_TAG} envsubst | kubectl apply -f -

echo "-----Waiting for Controller deployment-----"
kubectl wait --for=condition=available --timeout=300s deployment/thundernetes-controller-manager -n thundernetes-system
Expand Down
3 changes: 0 additions & 3 deletions pkg/operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ docker-push: ## Push docker image with the manager.

.PHONY: create-install-files
create-install-files:
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
## Create install files for thundernetes installed without API security
$(KUSTOMIZE) build config/default | API_SERVICE_SECURITY=none envsubst > ${INSTALL_FILES_FOLDER}/operator.yaml
## Create install files for thundernetes installed with API security
Expand All @@ -111,12 +110,10 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified

.PHONY: deploy
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/default | envsubst | kubectl apply -f -

.PHONY: deploye2e
deploye2e: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
$(KUSTOMIZE) build config/e2e | envsubst | kubectl apply -f -

.PHONY: undeploy
Expand Down
6 changes: 0 additions & 6 deletions pkg/operator/config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,3 @@ configMapGenerator:
- files:
- controller_manager_config.yaml
name: manager-config
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: ghcr.io/playfab/thundernetes-operator
newTag: 0.4.1
2 changes: 1 addition & 1 deletion pkg/operator/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- /manager
args:
- --leader-elect
image: controller:latest
image: ${IMG}
imagePullPolicy: IfNotPresent
env:
- name: MIN_PORT
Expand Down

0 comments on commit 0e25852

Please sign in to comment.