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

Update deprecated annotations in example demo #979

Merged
merged 4 commits into from
Apr 21, 2024

Conversation

JoeyC-Dev
Copy link
Contributor

Provide a description of what has been changed

The old annotation is being deprecated, and there will be a warning popped up for that.

helm install xkcd ./http-add-on/examples/xkcd 
fatal: destination path 'http-add-on' already exists and is not an empty directory.
W0418 05:55:35.571507    5828 warnings.go:70] annotation "kubernetes.io/ingress.class" is deprecated, please use 'spec.ingressClassName' instead

Checklist

Fixes #
Replace the annotation with current format, as indicated in: https://kubernetes.github.io/ingress-nginx/user-guide/basic-usage/

Test #
Works fine with the deployment of AKS.

# Create AKS
rG=joey-aks-keda-21612
aks=joey-aks-keda-21612

az group create -n ${rG} -l eastus 

az aks create -n ${aks} -g ${rG} --no-ssh-key --enable-keda --node-count 2 --node-vm-size Standard_A4_v2
az aks get-credentials -n ${aks} -g ${rG} 

# Install ingress-nginx
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update

helm install ingress-nginx ingress-nginx/ingress-nginx \
  --create-namespace \
  --namespace ingress-basic \
  --set controller.service.annotations."service\.beta\.kubernetes\.io/azure-load-balancer-health-probe-request-path"=/healthz \
  --set controller.service.externalTrafficPolicy=Local

# Install keda http add-on
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
helm install http-add-on kedacore/keda-add-ons-http --namespace kube-system

# Install example application with HTTPScaleObject
git clone -b patch-1 https://github.com/JoeyC-Dev/http-add-on.git
helm install xkcd ./http-add-on/examples/xkcd 

# Patch svc externalName
kubectl patch svc xkcd-proxy -p '{"spec":{"externalName": "keda-add-ons-http-interceptor-proxy.kube-system"}}'

# Get Ingress IP
sleep 30; ip=$(kubectl get ingress xkcd -o=jsonpath='{.status.loadBalancer.ingress[0].ip}')

# Test request
curl -H "Host: myhost.com" ${ip}/path1

# Clean up the resource
az group delete -n ${rG} --no-wait

The annotation one is being deprecated 

Signed-off-by: Joey Chen <142381267+JoeyC-Dev@users.noreply.github.com>
Signed-off-by: Joey Chen <142381267+JoeyC-Dev@users.noreply.github.com>
@JoeyC-Dev JoeyC-Dev requested a review from a team as a code owner April 18, 2024 06:11
@JoeyC-Dev JoeyC-Dev changed the title Update deprecated annotations ingress.yaml Update deprecated annotations in example demo Apr 18, 2024
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

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

Thanks for the improvement! ❤️

@JorTurFer JorTurFer enabled auto-merge (squash) April 18, 2024 06:43
Fix order to pass the Static Checks. 

Signed-off-by: Joey Chen <142381267+JoeyC-Dev@users.noreply.github.com>
auto-merge was automatically disabled April 18, 2024 07:19

Head branch was pushed to by a user without write access

@JoeyC-Dev
Copy link
Contributor Author

@JorTurFer Thank you for the reviewing, but the check is failed due to incorrect order in changelog.
https://github.com/kedacore/http-add-on/actions/runs/8733241431/job/23962464570?pr=979

Can you set auto-merge for this PR again? Thanks.

@JorTurFer JorTurFer enabled auto-merge (squash) April 21, 2024 11:15
@JorTurFer
Copy link
Member

Can you set auto-merge for this PR again? Thanks.

Sure!

@JorTurFer JorTurFer merged commit 473c42c into kedacore:main Apr 21, 2024
19 checks passed
@JoeyC-Dev JoeyC-Dev deleted the patch-1 branch April 21, 2024 11:42
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.

None yet

2 participants