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

Add a more comprehensive example #158

Merged
merged 2 commits into from
Feb 21, 2020

Conversation

nan-yu
Copy link
Contributor

@nan-yu nan-yu commented Feb 12, 2020

The new example includes apps.Deployment, batch.Job, Service, ConfigMap and a custom CRD.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 12, 2020
@nan-yu nan-yu force-pushed the more-test branch 2 times, most recently from 464a1a8 to e9e3303 Compare February 12, 2020 00:54
@nan-yu
Copy link
Contributor Author

nan-yu commented Feb 12, 2020

/assign @barney-s

I only added a bash script for deployment, but not for test, because the e2e test will be almost the same as wordpress.

acceptedNames:
kind: ""
plural: ""
conditions: []
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test includes CRD only without the controller, so the conditions wouldn't be updated and it makes no difference if we have a condition struct array or not. For simplicity, I would keep it empty.

make deploy

# Install the test CRD to the cluster
kubectl apply -f test_crd.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

We may have to wait for the crd to be registered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add a readln to confirm the CRD is registered.

kubectl apply -f application.yaml

# Verify application's status/components field shows all components
# Verify ownerReferences is added to all components' spec
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the script wait by itself ?
Do we need a readln OR a sleep here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We validate the components' specs and application's status manually, but I can add a readln in the script just in case we may want to automate the script later.

@barney-s
Copy link
Contributor

please take a look at #159
We could automate this test once that is merged.
Holding this till then.

@nan-yu
Copy link
Contributor Author

nan-yu commented Feb 12, 2020

awesome! Do we want to add a new e2e test for this comprehensive case? Or do we keep the bash script for now? @barney-s

name: "test-application-01"
labels:
app.kubernetes.io/name: "test-01"
spec:
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's encourage to use descriptor, especially once it's integrated with kubectl/kubernetes-dashboard that would be the first experience user get and missing fields wouldn't look good on those tools.

The new example includes apps.Deployment, batch.Job, Service, ConfigMap
and a custom CRD.
@nan-yu nan-yu force-pushed the more-test branch 7 times, most recently from 65cd9c3 to a44fb66 Compare February 20, 2020 23:09
@nan-yu
Copy link
Contributor Author

nan-yu commented Feb 20, 2020

@barney-s ready to be re-reviewed and merged

@barney-s
Copy link
Contributor

Thanks for updating.
Would you think using a kustomize.yaml + individual resources would be more readable ?
That way we can have 2 kustomize, 1 for good case and 1 for bad case with the same set of manifests.

If you want to do a follow up PR also it ok.
Let me know.

@barney-s
Copy link
Contributor

/lgtm
/approve

we can reorg the files in a follow up PR
Functionally this is good.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: barney-s, nan-yu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 21, 2020
@k8s-ci-robot k8s-ci-robot merged commit 11229ad into kubernetes-sigs:master Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants