Documentation ¶
Overview ¶
Code generated by "mdtogo"; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var UpsertResourceExamples = `
Replace an existing resource:
Let's start with the list of resources in a package:
apiVersion: v1
kind: Service
metadata:
name: myService
namespace: mySpace
spec:
selector:
app: foo
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: myDeployment
namespace: mySpace
spec:
replicas: 3
Resource to upsert:
apiVersion: v1
kind: Service
metadata:
name: myService
namespace: mySpace
spec:
selector:
app: bar
Invoking ` + "`" + `upsert-resource` + "`" + ` function replaces the resource with name ` + "`" + `myService` + "`" + `:
apiVersion: v1
kind: Service
metadata:
name: myService
namespace: mySpace
spec:
selector:
app: bar
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: myDeployment
namespace: mySpace
spec:
replicas: 3
Add a new resource:
For the same input resource list above, pass the following resource to upsert.
Note that the name of the resource is ` + "`" + `myService2` + "`" + `.
apiVersion: v1
kind: Service
metadata:
name: myService2
namespace: mySpace
spec:
selector:
app: bar
Invoking ` + "`" + `upsert-resource` + "`" + ` function adds the input resource to the package.
apiVersion: v1
kind: Service
metadata:
name: myService
namespace: mySpace
spec:
selector:
app: foo
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: myDeployment
namespace: mySpace
spec:
replicas: 3
---
apiVersion: v1
kind: Service
metadata:
name: myService2
namespace: mySpace
spec:
selector:
app: bar
`
View Source
var UpsertResourceLong = `
Upsert is an operation that adds a resource(uniquely identified by Group, Kind, Name and Namespace)
if it does not already exist, or replaces it if it already exists in the input list of resources.
` + "`" + `upsert-resource` + "`" + ` function offers a safe way to upsert a resource to the list of input resources.
`
View Source
var UpsertResourceShort = `Insert a resource, or if the resource already exists, update the existing resource.`
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.