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

Docker registry #332

Closed
wants to merge 4 commits into from
Closed

Docker registry #332

wants to merge 4 commits into from

Conversation

tombentley
Copy link
Member

Type of change

  • Bugfix
  • Enhancement / new feature
  • Refactoring

Description

This PR always pushed docker images to a local registry, which means the images used for the system test are the one produced by the build. If the system tests pass the images are pushed to docker hub.

Checklist

Please go through this checklist and make sure all applicable tasks have been done

  • Write tests
  • Make sure all tests pass
  • Update documentation
  • Check RBAC rights for Kubernetes / OpenShift roles
  • Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
  • Reference relevant issue(s) and close them after merging

Note: I have not yet tested this on master.

@tombentley tombentley requested a review from scholzj March 26, 2018 16:41
sleep 5;
done

kubectl port-forward --namespace kube-system $POD 5000:5000 &
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where the $POD var is set ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was originally setting it like POD=$(kubectl get po -n kube-system | grep 'registry-[a-z0-9]' | awk '{print $1;}), which I was executing before the loop. The problem is that, initially when minikube starts it doesn't even know what pod resources are, so it went wrong before the loop was even entered.

See the interesting discussion about why kubectl doesn't handle readiness already: kubernetes/kubernetes#1899

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really dumb but I still don't understand from where the $POD var comes from or where it's set :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ppatierno I updated the PR, so there is no $POD anymore

Copy link
Member

@ppatierno ppatierno Mar 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tombentley sorry, I remembered that after changes the comments are hidden by GitHub as "old" but I still saw our discussion with no changes on line 17. I can see the updated code in the "File changed" section ... sorry for asking twice :-)

Copy link
Member

@scholzj scholzj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. But I guess you will also need to modify the system tests to use the images from the local registry? Or how is thaat dealt with?

Also, will there be any issues with the secure / insecure registries (which you need to configure before starting oc cluster up)?

@tombentley
Copy link
Member Author

Or how is thaat dealt with?

TBH, I have no idea. The registry plugin doesn't seem to have any documentation. It had documentation, but that got removed, because apparently the YAML resources for it are documentation enough. So I don't know whether/how I need to take special steps to proxy the registry into the namespaces we use for testing, or whether than happens automagically.

Also, will there be any issues with the secure / insecure registries

From what I've read localhost:5000 is somehow special and means you don't need to mess around with certificates.

@scholzj
Copy link
Member

scholzj commented Mar 26, 2018

TBH, I have no idea. The registry plugin doesn't seem to have any documentation. It had documentation, but that got removed, because apparently the YAML resources for it are documentation enough. So I don't know whether/how I need to take special steps to proxy the registry into the namespaces we use for testing, or whether than happens automagically.

So my guess would be that you will need to prefix all images with localhost:5000. Such as image: localhost:8000/strimzi/cluster-controller:latest. But I'm just guessing - it is not like I know this for sure.

@tombentley
Copy link
Member Author

Let's not do it like this. Life's too short.

@tombentley tombentley closed this Mar 28, 2018
@tombentley tombentley deleted the docker-registry branch March 28, 2018 15:09
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

Successfully merging this pull request may close these issues.

3 participants