You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/proposals/puppet-wing-dry-run.rst
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ Verify puppet will make sensible and expected changes to the cluster when runnin
39
39
40
40
$ tarmak cluster puppet-plan
41
41
42
-
which complements ``cluster puppet-plan`` verifying Terraform changes.
42
+
which complements ``cluster plan`` verifying Terraform changes.
43
43
44
44
Changes
45
45
=======
@@ -82,18 +82,18 @@ field for each type of source. For example, something like this in ``types.go``:
82
82
}
83
83
84
84
85
-
``PuppetJob``
85
+
``WingJob``
86
86
*************
87
87
88
88
A resource representing the application of a ``PuppetManifest`` on an instance:
89
89
90
90
.. code-block:: yaml
91
91
92
-
kind: PuppetJob
92
+
kind: WingJob
93
93
metadata:
94
94
name: example-job
95
95
spec:
96
-
manifestRef:
96
+
puppetManifestRef:
97
97
name: example-manifest
98
98
operation: "dry-run"
99
99
instanceID: 1234
@@ -104,10 +104,17 @@ A resource representing the application of a ``PuppetManifest`` on an instance:
104
104
This references a pre-existing ``PuppetManifest``, and performs the specified
105
105
action on an instance.
106
106
107
+
If, in the future, we support other configuration management tools (ansible,
108
+
chef, etc), these would be represented by separate fields.
109
+
110
+
Performing updates to puppet manifests will leave ``WingJob`` and
111
+
``PuppetManifest`` resources hanging around. To prevent this, wing should only
112
+
keep the last 15 (or some other number) WingJobs for each instance.
113
+
107
114
Changes to existing API objects
108
115
-------------------------------
109
116
110
-
``InstanceSpec`` will have a ``manifestRef`` field also linking to a ``PuppetManifest`` resource.
117
+
``InstanceSpec`` will have a ``puppetManifestRef`` field also linking to a ``PuppetManifest`` resource.
111
118
This will be the manifest applied to the instance.
112
119
113
120
Changes to tarmak CLI
@@ -120,9 +127,9 @@ The planned workflow is to run::
120
127
121
128
$ tarmak cluster puppet-plan
122
129
123
-
which creates ``PuppetJob`` resources for either a subset of instances of each
130
+
which creates ``WingJob`` resources for either a subset of instances of each
124
131
type in the current cluster, or all instances. This blocks until
125
-
``PuppetJob.Status.ExitCode`` for each created job is populated.
132
+
``WingJob.Status.ExitCode`` for each created job is populated.
126
133
127
134
It would be nice to filter and only display results based on the exit code of puppet, but it seems the exit code is always ``0`` when ``--noop`` is enabled::
128
135
@@ -134,7 +141,4 @@ Notable items
134
141
Concerns
135
142
--------
136
143
137
-
- Performing updates to puppet manifests will leave ``PuppetJob`` and
138
-
``PuppetManifest`` resources hanging around. Should there be an automated clean
139
-
up process for stale items?
140
-
- We need to think about how to handle ``PuppetJob`` resources timing out in the case of an instance failure during a plan.
144
+
- We need to think about how to handle ``WingJob`` resources timing out in the case of an instance failure during a plan.
0 commit comments