-
Notifications
You must be signed in to change notification settings - Fork 22
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
Istio Crypto Scheduled Workflow #79
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: asubedy <[email protected]>
Signed-off-by: asubedy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's great to add Istio Crypto, I found some issues.
Signed-off-by: asubedy <[email protected]>
Signed-off-by: asubedy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One tiny nit but otherwise LGTM. @asubedy Thanks!
Signed-off-by: asubedy <[email protected]>
@asubedy Can I confirm that this PR ready to be merged? |
No @gyohuangxin it is not cometely ready. It still needs a dynamic component registration feature. It will not be able to create performance profile now. So let's hold on merging a little. Ill let you know when its ready |
Signed-off-by: asubedy <[email protected]>
Signed-off-by: asubedy <[email protected]>
export TCP_INGRESS_PORT=$(kubectl -n "$INGRESS_NS" get service "$INGRESS_NAME" -o jsonpath='{.spec.ports[?(@.name=="tcp")].port}') | ||
|
||
|
||
export GATEWAY_URL=http://$INGRESS_HOST:$INGRESS_PORT/headers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asubedy For crypto test case, the GATEWAY_URL
should be https://$INGRESS_HOST:$SECURE_INGRESS_PORT
.
And we need to generate a self-signed certificate to use in performance profile, so we can create another shell script which can be named as generate_csr.sh
, I can provide the script we used before:
# generate CA cerficate
openssl genrsa -out fortio.com.key 2048
openssl req -new -x509 -days 365 -key fortio.com.key -subj "/C=CN/ST=GD/L=SZ/O=fortio.com, Inc./CN=fortio.com Root CA" -out fortio.com.crt
# generate CSR
openssl req -newkey rsa:2048 -nodes -keyout httpbin.fortio.com.key -subj "/C=CN/ST=GD/L=SZ/O=fortio.com, Inc./CN=*.fortio.com" -out httpbin.fortio.com.csr
openssl x509 -req -extfile <(printf "subjectAltName=IP:10.239.241.168,DNS:fortio.com,DNS:www.fortio.com") -days 365 -in httpbin.fortio.com.csr -CA fortio.com.crt -CAkey fortio.com.key -CAcreateserial -out httpbin.fortio.com.crt
# upload key and crt as a secret
kubectl create -n istio-system secret tls httpbin-fortio-credential --key=httpbin.fortio.com.key --cert=httpbin.fortio.com.crt
Then we can use the URL and fortio.com.crt
in performance file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gyohuangxin I created the file, so we run this script after deploying Istio Crypto and deploying httpbin application right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asubedy Yes, it's correct.
Signed-off-by: asubedy <[email protected]>
|
||
# generate CSR | ||
openssl req -newkey rsa:2048 -nodes -keyout httpbin.fortio.com.key -subj "/C=CN/ST=GD/L=SZ/O=fortio.com, Inc./CN=*.fortio.com" -out httpbin.fortio.com.csr | ||
openssl x509 -req -extfile <(printf "subjectAltName=IP:10.239.241.168,DNS:fortio.com,DNS:www.fortio.com") -days 365 -in httpbin.fortio.com.csr -CA fortio.com.crt -CAkey fortio.com.key -CAcreateserial -out httpbin.fortio.com.crt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@asubedy The IP address is hardcoded here, we need to replace it to the ingress ip.
endpoint_url: ${{env.ENDPOINT_URL}} | ||
service_mesh: ${{env.SERVICE_MESH}} | ||
load_generator: fortio | ||
profile_name: 'istioCrypto-load-test.yaml' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add the certificate generated by generate_csr.sh
script in the profile, we can add another item cert_path
to use the certificate. But it depends on this PR: meshery/meshery#8148.
|
||
# generate CA cerficate | ||
openssl genrsa -out fortio.com.key 2048 | ||
openssl req -new -x509 -days 365 -key fortio.com.key -subj "/C=CN/ST=GD/L=SZ/O=fortio.com, Inc./CN=fortio.com Root CA" -out fortio.com.crt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The address fortio.com
is come from application we used in our test environment, it may be confusing to other developers. Can you replace all fortio.com
here with another word, such as the application used in this test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gyohuangxin so change all the instances that mentions fortio.com
with httpbin_app
there are some instances that have httpbin.fortio.com.key
so we will change this into httpbin.httpbin_app.key
right?
@asubedy Left some comments, if you have any doubts feel free to ask here or on Slack channel. Thanks! |
Signed-off-by: asubedy <[email protected]>
@gyohuangxin could you please send the httpbin application file that you used file I am using this file but it is showing me some error
|
@asubedy I think it comes from the Istio example: https://github.com/istio/istio/blob/master/samples/httpbin/httpbin.yaml, we are also using it. Can you show me the error you met? |
A quick note that I have added these configuration too on the httpbin application as given in this guide |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue is being automatically closed due to inactivity. However, you may choose to reopen this issue. |
Description
This PR fixes #
Notes for Reviewers
Signed commits