Comments (10)
thanks!
from spring-cloud-kubernetes.
some time ago, we had such code in place in that integration test:
// for Mac M1 with aarch64
if (System.getProperty("os.arch").equals("aarch64")) {
processExecResult(K3S.execInContainer("sh", "-c", CONTAINER_ISTIO_BIN_PATH + "istioctl"
+ " --kubeconfig=/etc/rancher/k3s/k3s.yaml install --set hub=docker.io/querycapistio --set profile=minimal -y"));
}
The reason for that was simple: before istio 1.16 there was no support for arm64, and we had to somehow run that locally. I'm on Mac M1 too, so is Ryan, iirc.
Since we upgraded to 1.16, there is no need for that anymore, so we dropped that check.
I don't understand your point about:
copy this from the image pulled
what image? k3s? If so, it does not have istio or istioctl.
from spring-cloud-kubernetes.
If you think this isn't needed anymore, maybe delete the following and make sure passes on your side?
spring-cloud-kubernetes-test-support/src/main/resources/istio-cli/istio-1.16.0/bin/istioctl
from spring-cloud-kubernetes.
I'm confused even more now :) its most probably the fact that its over 23:00 where I am, so sorry upfront.
How can I delete those, if I need istioctl, and I don't have it in the container?
My point above was that we don't need that check anymore because since 1.16 it works on arm64, but we still need istioctl, of course
from spring-cloud-kubernetes.
The file checked into version control, spring-cloud-kubernetes-test-support/src/main/resources/istio-cli/istio-1.16.0/bin/istioctl
is an x64 binary (you can verify by doing file
on that).
If it works on an arm64 machine, there's an assumption of x64 emulation available (and also in the docker runtime).
Maybe in the morning, re-read this part if it doesn't make sense now ;) I think that it isn't typical or correct to depend on being to emulate a specific architecture, even if it was ok to check in an 80MB binary.
from spring-cloud-kubernetes.
ah! I see your point, so you basically want to run this test locally, on your Mac M1, but that is a x64 binary... makes sense now. I'll need to think about it for a while, because I don't think we want another binary in the source control specific to arm64
from spring-cloud-kubernetes.
I don't think we want another binary in the source control specific to arm64
Right, so what I meant was to get it from an image, like istiod's docker image. The image you pull should already be the correct arch, so the binary in there should be the right one.
from spring-cloud-kubernetes.
so istio/istioctl:1.21.1
has it
$ car --platform=linux/amd64 -tvf istio/istioctl:1.21.1 |grep istioctl
-rwxr-xr-x 81383576 Apr 5 06:39:43 usr/local/bin/istioctl
from spring-cloud-kubernetes.
yup, I saw that one too. working on it, let's see...
from spring-cloud-kubernetes.
will be something like this:
// Copy istioctl to the k3s container
DockerClient client = K3S.getDockerClient();
String ISTIO_ISTIOCTL = "istio/istioctl";
Commons.pullImage(ISTIO_ISTIOCTL, Commons.ISTIO_VERSION, K3S);
try (CreateContainerCmd createCmd = client.createContainerCmd(ISTIO_ISTIOCTL + ":" + Commons.ISTIO_VERSION)) {
CreateContainerResponse container = createCmd.
withEntrypoint("/bin/sh", "-c").
withCmd("while true; do sleep 1000; done").
exec();
try (StartContainerCmd startCmd = client.startContainerCmd(container.getId())) {
startCmd.exec();
try (CopyArchiveFromContainerCmd copyCmd = client.copyArchiveFromContainerCmd(container.getId(), "/usr/local/bin/istioctl");
InputStream response = copyCmd.exec()) {
K3S.copyFileToContainer(
Transferable.of(response.readAllBytes()),
"/tmp/istioctl"
);
}
}
finally { // Stop and remove the container
K3S.getDockerClient().stopContainerCmd(container.getId()).exec();
K3S.getDockerClient().removeContainerCmd(container.getId()).exec();
}
}
from spring-cloud-kubernetes.
Related Issues (20)
- Spring Cloud Kubernetes - Use Informers instead of Watchers
- In rare scenarios ConfigMap update is not updated using polling strategy HOT 9
- load balancer SERVICE implementation HOT 1
- support running Fabric8IstioIT with colima HOT 7
- Future status of the `PropertySource Reload` feature HOT 1
- Importing kubernetes: config doesn't work as document with YAML config HOT 4
- config server default profile issue HOT 5
- User "system:serviceaccount:default:mockup" cannot list resource "services" in API group "" in the namespace "default" HOT 7
- Cannot find service - SERVICE_UNAVAILABLE HOT 17
- Dependency convergence fails for spring-cloud-starter-kubernetes-client-config ver 3.1.1 HOT 5
- [els.V1Service-1] i.k.c.informer.cache ReflectorRunnable : class io.kubernetes.client.openapi.models.V1Service#Reflector loop failed unexpectedly HOT 9
- Caused by: io.kubernetes.client.openapi.ApiException HOT 11
- No qualifying bean of type 'io.kubernetes.client.informer.SharedInformerFactory' HOT 3
- KubernetesReactiveDiscoveryClient cache configuration issues HOT 7
- Cannot connect to remote service - SERVICE_UNAVAILABLE HOT 18
- Migrate @RibbonClient for spring-cloud-starter-kubernetes-discoveryclient HOT 3
- [QUESTION] Different behaviour kubernetes-client-config / kubernetes-client-all HOT 9
- How to disable the `kubernetes` profile? HOT 3
- Allow using Watcher when ConfigMaps and Secrets are maintained by external team HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-kubernetes.