Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Add dry-run proposal #273

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kragniz
Copy link
Contributor

@kragniz kragniz commented Jun 1, 2018

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

Release note:

none

@jetstack-bot jetstack-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jun 1, 2018
@jetstack-bot jetstack-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 1, 2018
Changes to existing API objects
-------------------------------

``InstanceSpec`` will have a ``manifestRef`` field also linking to a ``PuppetManifest`` resource.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be a puppetManifestRef


- Performing updates to puppet manifests will leave ``PuppetJob`` and
``PuppetManifest`` resources hanging around. Should there be an automated clean
up process for stale items?
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think similar to how jobs clear a pod associated with them we should only keep like the last 15 WingJobs. (Ideally that is configurable by a variable in the Instance type)


$ tarmak cluster puppet-plan

which creates ``PuppetJob`` resources for either a subset of instances of each
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it should be called more generic WingJob

@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 1, 2018
@jetstack-bot jetstack-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 1, 2018

Verify puppet will make sensible and expected changes to the cluster when running::

$ tarmak cluster puppet-plan
Copy link
Contributor

Choose a reason for hiding this comment

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

To prepare for the (slim) chance that we have multiple options for instance configuration, we shouldn't tie this command to puppet - instead something like tarmak cluster config-plan?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

New API objects
---------------

``PuppetManifest``
Copy link
Contributor

Choose a reason for hiding this comment

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

As PuppetManifest represents multiple manifests (and lots of other stuff), it might be confusing having the singular in the name. Perhaps PuppetTarget would be more appropriate, which could later be expanded to AnsibleTarget.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

``PuppetManifest``
******************

A resource representing a set of puppet manifests to apply to an instance.
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth mentioning that the configuration referenced by a PuppetManifest resource contains lots of other stuff (e.g. puppet modules, hieradata etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

.. code-block:: go

type ManifestSource struct {
S3 *S3ManifestSource `json:"s3ManifestSource"`
Copy link
Contributor

Choose a reason for hiding this comment

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

json:"s3ManifestSource" -> json:"s3" to match with the configuration block above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Changes to existing API objects
-------------------------------

``InstanceSpec`` will have a ``puppetManifestRef`` field also linking to a ``PuppetManifest`` resource.
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth clarifying how this field would interact with the new resources described above - what would happen if the puppetManifestRef field on InstanceSpec changed, would wing work towards trying to apply the new puppet manifest without creating a corresponding WingJob resource? And if a new WingJob resource was created with an operation of apply rather than dry-run would this field be updated if the configuration was applied successfully?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@dippynark
Copy link
Contributor

/assign @dippynark

@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: dippynark

Assign the PR to them by writing /assign @dippynark in a comment when ready.

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

@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 15, 2018
@jetstack-bot
Copy link
Collaborator

@kragniz: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dippynark
Copy link
Contributor

/unassign
/assign @kragniz

@jetstack-bot jetstack-bot assigned kragniz and unassigned dippynark Jun 20, 2018
@simonswine
Copy link
Contributor

Would be great to get that updated an merged @kragniz

@jetstack-bot
Copy link
Collaborator

@kragniz: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
tarmak-docs-verify c1f349e link /test verify docs
tarmak-puppet-module-tarmak-acceptance-1-14-centos c1f349e link /test puppet-tarmak-acceptance-centos v1.14

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. priority/P1 release-note-none Denotes a PR that doesn't merit a release note. 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