Abdelhadi Khiati před 6 roky
rodič
revize
d984c4880c

+ 2 - 2
packages/@uppy/companion/infra/kube/companion/companion-kube.yaml

@@ -46,7 +46,7 @@ spec:
                 - companion
             topologyKey: kubernetes.io/hostname    
       containers:
-      - image: docker.io/transloadit/uppy-companion:latest
+      - image: docker.io/kiloreux/uppy-companion:latest
         imagePullPolicy: Always
         name: companion        
         resources:
@@ -56,7 +56,7 @@ spec:
             memory: 2Gi
         envFrom:
         - configMapRef:
-            name: companion-env
+            name: uppy-companion-env
         ports:
         - containerPort: 3020
         volumeMounts:

+ 9 - 11
packages/@uppy/companion/infra/kube/gcloud-deploy.sh

@@ -11,28 +11,26 @@ __companion="$(dirname "$(dirname "${__kube}")")"
 # Install kubectl
 curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
 chmod +x ./kubectl
-sudo mv ./kubectl /usr/local/bin/kubectl
+mv ./kubectl ${HOME}/.local/bin/
 
 
 # Store the new image in docker hub
-docker build --quiet -t transloadit/companion:latest -t transloadit/companion:$TRAVIS_COMMIT .;
+docker build --quiet -t kiloreux/uppy-companion:latest -t kiloreux/uppy-companion:$TRAVIS_COMMIT .;
 docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
-docker push transloadit/companion:$TRAVIS_COMMIT;
-docker push transloadit/companion:latest;
+docker push kiloreux/uppy-companion:$TRAVIS_COMMIT;
+docker push kiloreux/uppy-companion:latest;
 
 echo $KUBECONFIG | base64 --decode -i > ${HOME}/.kube/config
 
 # Should be already removed. Using it temporarily.
-rm -f "${__kube}/companion/uppy-env.yaml"
-echo $UPPY_ENV | base64 --decode > "${__kube}/companion/uppy-env.yaml"
+rm -f "${__kube}/companion/companion-env.yaml"
+echo $COMPANION_ENV | base64 --decode > "${__kube}/companion/companion-env.yaml"
 
-kubectl config current-context
-
-kubectl apply -f "${__kube}/companion/uppy-env.yaml"
+kubectl apply -f "${__kube}/companion/companion-env.yaml"
 sleep 10s # This cost me some precious debugging time.
 kubectl apply -f "${__kube}/companion/companion-kube.yaml"
 kubectl apply -f "${__kube}/companion/companion-redis.yaml"
-kubectl set image statefulset companion --namespace=uppy companion=docker.io/transloadit/companion:$TRAVIS_COMMIT
+kubectl set image statefulset companion --namespace=uppy companion=docker.io/kiloreux/uppy-companion:$TRAVIS_COMMIT
 sleep 10s
 
 kubectl get pods --namespace=uppy
@@ -41,7 +39,7 @@ kubectl get deployment --namespace=uppy
 
 function cleanup {
     printf "Cleaning up...\n"
-    rm -vf "${__kube}/companion/uppy-env.yaml"
+    rm -vf "${__kube}/companion/companion-env.yaml"
     printf "Cleaning done."
 }