Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't parse image reference "${REPOSITORY_PREFIX} #32

Open
patsevanton opened this issue Oct 1, 2021 · 2 comments
Open

couldn't parse image reference "${REPOSITORY_PREFIX} #32

patsevanton opened this issue Oct 1, 2021 · 2 comments

Comments

@patsevanton
Copy link
Contributor

Show files with REPOSITORY_PREFIX

grep -R  {REPOSITORY_PREFIX}/api-gateway:latest .
./scripts/pushImages.sh:docker push ${REPOSITORY_PREFIX}/api-gateway:latest
./k8s/api-gateway-deployment.yaml:      - image: ${REPOSITORY_PREFIX}/api-gateway:latest

Create ENV variable

export REPOSITORY_PREFIX=antonpatsev

Run skafford

skaffold dev --default-repo antonpatsev
Listing files to watch...
 - spring-petclinic-config-server
 - spring-petclinic-discovery-server
 - spring-petclinic-customers-service
 - spring-petclinic-visits-service
 - spring-petclinic-vets-service
 - spring-petclinic-api-gateway
Generating tags...
 - spring-petclinic-config-server -> antonpatsev/spring-petclinic-config-server:latest
 - spring-petclinic-discovery-server -> antonpatsev/spring-petclinic-discovery-server:latest
 - spring-petclinic-customers-service -> antonpatsev/spring-petclinic-customers-service:latest
 - spring-petclinic-visits-service -> antonpatsev/spring-petclinic-visits-service:latest
 - spring-petclinic-vets-service -> antonpatsev/spring-petclinic-vets-service:latest
 - spring-petclinic-api-gateway -> antonpatsev/spring-petclinic-api-gateway:latest
Checking cache...
 - spring-petclinic-config-server: Found Remotely
 - spring-petclinic-discovery-server: Found Remotely
 - spring-petclinic-customers-service: Found Remotely
 - spring-petclinic-visits-service: Found Remotely
 - spring-petclinic-vets-service: Found Remotely
 - spring-petclinic-api-gateway: Found Remotely
Tags used in deployment:
 - spring-petclinic-config-server -> antonpatsev/spring-petclinic-config-server:latest@sha256:2792e7678e83f01cda7d71754f7dad1403416ac672f7078d81cbe8ebb1cf1c33
 - spring-petclinic-discovery-server -> antonpatsev/spring-petclinic-discovery-server:latest@sha256:3af5b8f83d44cf11f7aa26be1fcf595a68ee82a73ea6c2b8feaa1478c213080b
 - spring-petclinic-customers-service -> antonpatsev/spring-petclinic-customers-service:latest@sha256:62e940d6655e18d4b3af73902839b1fc377379fa6acc0bc33e72204e47acb6df
 - spring-petclinic-visits-service -> antonpatsev/spring-petclinic-visits-service:latest@sha256:38f48e411ce963ca5e8e083ca6a64b36438f2ca51b613ee2830e8aecda25d214
 - spring-petclinic-vets-service -> antonpatsev/spring-petclinic-vets-service:latest@sha256:9ad091cd546153f4ccafffdbf31db2c7f987c2b6cc18146ed07fa5ebd05636d3
 - spring-petclinic-api-gateway -> antonpatsev/spring-petclinic-api-gateway:latest@sha256:7f8b9598f263c16ec75ec6e9d8bc8e1885be090f180150470a6d452a2b52d953
Starting deploy...
Helm release customers-db-mysql not installed. Installing...
NAME: customers-db-mysql
LAST DEPLOYED: Fri Oct  1 05:32:43 2021
NAMESPACE: spring-petclinic
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
** Please be patient while the chart is being deployed **

Tip:

  Watch the deployment status using the command: kubectl get pods -w --namespace spring-petclinic

Services:

  echo Primary: customers-db-mysql.spring-petclinic.svc.cluster.local:3306

Execute the following to get the administrator credentials:

  echo Username: root
  MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace spring-petclinic customers-db-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode)

To connect to your database:

  1. Run a pod that you can use as a client:

      kubectl run customers-db-mysql-client --rm --tty -i --restart='Never' --image  docker.io/bitnami/mysql:8.0.26-debian-10-r60 --namespace spring-petclinic --command -- bash

  2. To connect to primary service (read/write):

      mysql -h customers-db-mysql.spring-petclinic.svc.cluster.local -uroot -p"$MYSQL_ROOT_PASSWORD"



To upgrade this helm chart:

  1. Obtain the password as described on the 'Administrator credentials' section and set the 'root.password' parameter as shown below:

      ROOT_PASSWORD=$(kubectl get secret --namespace spring-petclinic customers-db-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode)
      helm upgrade --namespace spring-petclinic customers-db-mysql bitnami/mysql --set auth.rootPassword=$ROOT_PASSWORD
Helm release vets-db-mysql not installed. Installing...
NAME: vets-db-mysql
LAST DEPLOYED: Fri Oct  1 05:33:08 2021
NAMESPACE: spring-petclinic
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
** Please be patient while the chart is being deployed **

Tip:

  Watch the deployment status using the command: kubectl get pods -w --namespace spring-petclinic

Services:

  echo Primary: vets-db-mysql.spring-petclinic.svc.cluster.local:3306

Execute the following to get the administrator credentials:

  echo Username: root
  MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace spring-petclinic vets-db-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode)

To connect to your database:

  1. Run a pod that you can use as a client:

      kubectl run vets-db-mysql-client --rm --tty -i --restart='Never' --image  docker.io/bitnami/mysql:8.0.26-debian-10-r60 --namespace spring-petclinic --command -- bash

  2. To connect to primary service (read/write):

      mysql -h vets-db-mysql.spring-petclinic.svc.cluster.local -uroot -p"$MYSQL_ROOT_PASSWORD"



To upgrade this helm chart:

  1. Obtain the password as described on the 'Administrator credentials' section and set the 'root.password' parameter as shown below:

      ROOT_PASSWORD=$(kubectl get secret --namespace spring-petclinic vets-db-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode)
      helm upgrade --namespace spring-petclinic vets-db-mysql bitnami/mysql --set auth.rootPassword=$ROOT_PASSWORD
Helm release visits-db-mysql not installed. Installing...
NAME: visits-db-mysql
LAST DEPLOYED: Fri Oct  1 05:33:35 2021
NAMESPACE: spring-petclinic
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
** Please be patient while the chart is being deployed **

Tip:

  Watch the deployment status using the command: kubectl get pods -w --namespace spring-petclinic

Services:

  echo Primary: visits-db-mysql.spring-petclinic.svc.cluster.local:3306

Execute the following to get the administrator credentials:

  echo Username: root
  MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace spring-petclinic visits-db-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode)

To connect to your database:

  1. Run a pod that you can use as a client:

      kubectl run visits-db-mysql-client --rm --tty -i --restart='Never' --image  docker.io/bitnami/mysql:8.0.26-debian-10-r60 --namespace spring-petclinic --command -- bash

  2. To connect to primary service (read/write):

      mysql -h visits-db-mysql.spring-petclinic.svc.cluster.local -uroot -p"$MYSQL_ROOT_PASSWORD"



To upgrade this helm chart:

  1. Obtain the password as described on the 'Administrator credentials' section and set the 'root.password' parameter as shown below:

      ROOT_PASSWORD=$(kubectl get secret --namespace spring-petclinic visits-db-mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode)
      helm upgrade --namespace spring-petclinic visits-db-mysql bitnami/mysql --set auth.rootPassword=$ROOT_PASSWORD
WARN[0081] image [antonpatsev/spring-petclinic-config-server:latest@sha256:2792e7678e83f01cda7d71754f7dad1403416ac672f7078d81cbe8ebb1cf1c33] is not used. 
WARN[0081] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration 
WARN[0081] image [antonpatsev/spring-petclinic-discovery-server:latest@sha256:3af5b8f83d44cf11f7aa26be1fcf595a68ee82a73ea6c2b8feaa1478c213080b] is not used. 
WARN[0081] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration 
WARN[0081] image [antonpatsev/spring-petclinic-customers-service:latest@sha256:62e940d6655e18d4b3af73902839b1fc377379fa6acc0bc33e72204e47acb6df] is not used. 
WARN[0081] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration 
WARN[0081] image [antonpatsev/spring-petclinic-visits-service:latest@sha256:38f48e411ce963ca5e8e083ca6a64b36438f2ca51b613ee2830e8aecda25d214] is not used. 
WARN[0081] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration 
WARN[0081] image [antonpatsev/spring-petclinic-vets-service:latest@sha256:9ad091cd546153f4ccafffdbf31db2c7f987c2b6cc18146ed07fa5ebd05636d3] is not used. 
WARN[0081] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration 
WARN[0081] image [antonpatsev/spring-petclinic-api-gateway:latest@sha256:7f8b9598f263c16ec75ec6e9d8bc8e1885be090f180150470a6d452a2b52d953] is not used. 
WARN[0081] See helm documentation on how to replace image names with their actual tags: https://skaffold.dev/docs/pipeline-stages/deployers/helm/#image-configuration 
Waiting for deployments to stabilize...
Deployments stabilized in 7.411549ms
 - Warning: resource namespaces/spring-petclinic is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
 - namespace/spring-petclinic configured
 - secret/regcred created
 - configmap/petclinic-config created
 - role.rbac.authorization.k8s.io/namespace-reader created
 - rolebinding.rbac.authorization.k8s.io/namespace-reader-binding created
 - service/api-gateway created
 - service/customers-service created
 - service/vets-service created
 - service/visits-service created
 - deployment.apps/api-gateway created
 - deployment.apps/customers-service created
 - deployment.apps/vets-service created
 - deployment.apps/visits-service created
Waiting for deployments to stabilize...
 - spring-petclinic:deployment/api-gateway: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/api-gateway:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/api-gateway:latest": invalid reference format: repository name must be lowercase
    - spring-petclinic:pod/api-gateway-5bc8d44664-48tgv: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/api-gateway:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/api-gateway:latest": invalid reference format: repository name must be lowercase
 - spring-petclinic:deployment/customers-service: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/customers-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/customers-service:latest": invalid reference format: repository name must be lowercase
    - spring-petclinic:pod/customers-service-75c77f6cd9-qf9ts: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/customers-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/customers-service:latest": invalid reference format: repository name must be lowercase
 - spring-petclinic:deployment/vets-service: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/vets-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/vets-service:latest": invalid reference format: repository name must be lowercase
    - spring-petclinic:pod/vets-service-854775b9b9-nz6vr: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/vets-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/vets-service:latest": invalid reference format: repository name must be lowercase
 - spring-petclinic:deployment/visits-service: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/visits-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/visits-service:latest": invalid reference format: repository name must be lowercase
    - spring-petclinic:pod/visits-service-86f868f9f7-nczj7: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/visits-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/visits-service:latest": invalid reference format: repository name must be lowercase
 - spring-petclinic:deployment/api-gateway: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/api-gateway:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/api-gateway:latest": invalid reference format: repository name must be lowercase
    - spring-petclinic:pod/api-gateway-5bc8d44664-48tgv: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/api-gateway:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/api-gateway:latest": invalid reference format: repository name must be lowercase
 - spring-petclinic:deployment/api-gateway failed. Error: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/api-gateway:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/api-gateway:latest": invalid reference format: repository name must be lowercase.
 - spring-petclinic:deployment/visits-service: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/visits-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/visits-service:latest": invalid reference format: repository name must be lowercase
    - spring-petclinic:pod/visits-service-86f868f9f7-nczj7: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/visits-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/visits-service:latest": invalid reference format: repository name must be lowercase
 - spring-petclinic:deployment/visits-service failed. Error: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/visits-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/visits-service:latest": invalid reference format: repository name must be lowercase.
 - spring-petclinic:deployment/vets-service: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/vets-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/vets-service:latest": invalid reference format: repository name must be lowercase
    - spring-petclinic:pod/vets-service-854775b9b9-nz6vr: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/vets-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/vets-service:latest": invalid reference format: repository name must be lowercase
 - spring-petclinic:deployment/vets-service failed. Error: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/vets-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/vets-service:latest": invalid reference format: repository name must be lowercase.
 - spring-petclinic:deployment/customers-service: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/customers-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/customers-service:latest": invalid reference format: repository name must be lowercase
    - spring-petclinic:pod/customers-service-75c77f6cd9-qf9ts: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/customers-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/customers-service:latest": invalid reference format: repository name must be lowercase
 - spring-petclinic:deployment/customers-service failed. Error: InspectFailed: Failed to apply default image tag "${REPOSITORY_PREFIX}/customers-service:latest": couldn't parse image reference "${REPOSITORY_PREFIX}/customers-service:latest": invalid reference format: repository name must be lowercase.
Cleaning up...
release "customers-db-mysql" uninstalled
release "vets-db-mysql" uninstalled
release "visits-db-mysql" uninstalled
 - namespace "spring-petclinic" deleted
 - secret "regcred" deleted
 - configmap "petclinic-config" deleted
 - role.rbac.authorization.k8s.io "namespace-reader" deleted
 - rolebinding.rbac.authorization.k8s.io "namespace-reader-binding" deleted
 - service "api-gateway" deleted
 - service "customers-service" deleted
 - service "vets-service" deleted
 - service "visits-service" deleted
 - deployment.apps "api-gateway" deleted
 - deployment.apps "customers-service" deleted
 - deployment.apps "vets-service" deleted
 - deployment.apps "visits-service" deleted
4/4 deployment(s) failed
@patsevanton
Copy link
Contributor Author

Try envsubst later

@patsevanton
Copy link
Contributor Author

patsevanton commented Oct 1, 2021

Work:

envsubst < k8s/vets-service-deployment.yaml | tee k8s/vets-service-deployment.yaml
envsubst < k8s/api-gateway-deployment.yaml | tee k8s/api-gateway-deployment.yaml
envsubst < k8s/visits-service-deployment.yaml | tee k8s/visits-service-deployment.yaml
envsubst < k8s/customers-service-deployment.yaml | tee k8s/customers-service-deployment.yaml

Need add to readme.
Close after add to documetation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant