(operation OperationType, obj any)
| 261 | } |
| 262 | |
| 263 | func newCreateOperation(operation OperationType, obj any) sdkpkg.PatchCollectorOperation { |
| 264 | op := &createOperation{ |
| 265 | object: obj, |
| 266 | } |
| 267 | |
| 268 | switch operation { |
| 269 | case Create: |
| 270 | // pass |
| 271 | case CreateOrUpdate: |
| 272 | op.updateIfExists = true |
| 273 | case CreateIfNotExists: |
| 274 | op.ignoreIfExists = true |
| 275 | } |
| 276 | |
| 277 | return op |
| 278 | } |
| 279 | |
| 280 | func NewDeleteOperation(apiVersion string, kind string, namespace string, name string) sdkpkg.PatchCollectorOperation { |
| 281 | return newDeleteOperation(metav1.DeletePropagationForeground, apiVersion, kind, namespace, name) |
no outgoing calls
no test coverage detected