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

Kong #134

Merged
merged 6 commits into from
Sep 21, 2023
Merged

Kong #134

merged 6 commits into from
Sep 21, 2023

Conversation

DaniellaFreese
Copy link
Contributor

Issue #, if available:

Description of changes:

Adding Kong as a Partner
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@DaniellaFreese Thankyou so much for a PR with kong. curl test job does not qualify for a functional test job please see our job requirements for a valid functional test. Also do we need license keys to run this addon. If so can you share the same in secured channel.

containers:
- name: job
image: curlimages/curl
command: ["curl", "-ks", "--location", "http://eks-anywhere-kong-proxy.kong.svc.cluster.local:80"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check our Functional Job Requirements. curl is not an approved test job for functional test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi @elamaran11 we provided a more robust functional test.

Regarding the question on keys, yes this test does work without a license key, it will run in evaluation mode.
https://docs.konghq.com/gateway/latest/licenses/

Copy link
Contributor

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@DaniellaFreese Thankyou for taking time to update the functional test. Have few comments on the functional test :

  1. The job should be a cronjob which runs daily in a schedule
  2. The job is not cleaning up created resources such as svc, pod, ingress after the completion

Once you fix the above, i can retest again and also test in all environments. Basically the functional test coverage is looking good but we need the above to be taken care.

@elamaran11
Copy link
Contributor

Closing and Reopening this PR to have GH actions kick in. Apologies for the inconvenience.

@elamaran11 elamaran11 closed this Sep 18, 2023
@elamaran11 elamaran11 reopened this Sep 18, 2023
Copy link
Contributor

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@DaniellaFreese CronJob is incorrect (looks like you replaced the type job with cronjob and its missing important fields. The CronJob is missing JobTemplate and schedule, please check this partner cronjob for reference :

https://github.com/aws-samples/eks-anywhere-addons/blob/main/eks-anywhere-common/Testers/Nirmata/kyverno-testjob.yaml

Below is the error :

  Warning  ReconciliationFailed     60s                   kustomize-controller  CronJob/kong/kong-enterprise-testjob dry-run failed, error: failed to create typed patch object (kong/kong-enterprise-testjob; batch/v1, Kind=CronJob): .spec.template: field not declared in schema

Copy link
Contributor

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@DaniellaFreese The cron job ran fine with a trigger, we are good but i get this error. I think the Role is not having sufficient permission. Please do the needful.

❯ k logs kong-enterprise-testjob-001-bd775  -n kong                                                               ─╯
service/echo created
deployment.apps/echo created
ingress.networking.k8s.io/demo created
service "echo" deleted
Error from server (Forbidden): deployments.apps is forbidden: User "system:serviceaccount:kong:default" cannot list resource "deployments" in API group "apps" in the namespace "kong"
Error from server (Forbidden): ingresses.networking.k8s.io is forbidden: User "system:serviceaccount:kong:default" cannot list resource "ingresses" in API group "networking.k8s.io" in the namespace "kong"

 Kong Gateway is running, test service passed

@DaniellaFreese
Copy link
Contributor Author

@elamaran11 pushed a fix for the role, and cronjob manifest.

@elamaran11
Copy link
Contributor

@DaniellaFreese I tested the changes in our BareMetal environment and the ISV addon for Kong works fine with functional test. No action needed from your end at the moment. We will continue to complete our validation in other environments such as Snowball, vSphere and Local Cluster over next two days and will complete the all validations and merge provided the software and test works fine in all environments as expectged.

@elamaran11
Copy link
Contributor

@DaniellaFreese Kong works fine in EKS-A vSphere and EKS Local Cluster environment. We are pending validation on EKS-A on Snowball which i should be able to complete in couple of days as i get to the lab. Stay tuned.

Copy link
Contributor

@elamaran11 elamaran11 left a comment

Choose a reason for hiding this comment

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

@DaniellaFreese Congratulations, Kong worked fine. In all 4 deployment models. Please see the output from snow below. Request you to keep Kong's software up to date to be compliant with conformance of Kong with our Conformitron framework.

kubectl get all -n kong

NAME                                     READY   STATUS      RESTARTS   AGE
pod/eks-anywhere-kong-778cdc5cb6-crxsb   2/2     Running     0          21m
pod/kong-enterprise-testjob-001-jzcwf    0/1     Completed   0          7m9s

NAME                                           TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
service/eks-anywhere-kong-proxy                ClusterIP   10.96.104.241   <none>        80/TCP,443/TCP   21m
service/eks-anywhere-kong-validation-webhook   ClusterIP   10.104.202.82   <none>        443/TCP          21m

NAME                                READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/eks-anywhere-kong   1/1     1            1           21m

NAME                                           DESIRED   CURRENT   READY   AGE
replicaset.apps/eks-anywhere-kong-778cdc5cb6   1         1         1       21m

NAME                                    SCHEDULE      SUSPEND   ACTIVE   LAST SCHEDULE   AGE
cronjob.batch/kong-enterprise-testjob   10 10 * * *   False     0        <none>          8m28s

NAME                                    COMPLETIONS   DURATION   AGE
job.batch/kong-enterprise-testjob-001   1/1           5m51s      7m17s

@elamaran11
Copy link
Contributor

Ignoring the GH Action failure as the GH action to work for Fork is worked upon and not really and error. Merging this.

@elamaran11 elamaran11 merged commit e2ad87c into aws-samples:main Sep 21, 2023
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