Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/public/components/create-yaml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export const CreateYAMLInner = ({

const { metadata, spec } = parsed;
const { crd, kind, namespaced } = kindObj;
const isDefaultTemplate = crd && template === yamlTemplates.getIn(['DEFAULT', 'default']);
const isDefaultTemplate =
crd && resolvedTemplate === yamlTemplates.getIn(['DEFAULT', 'default']);
return {
...parsed,
kind,
Expand Down
39 changes: 39 additions & 0 deletions frontend/public/models/yaml-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,28 @@ metadata:
name: example
spec:
providerSpec: {}
`,
)
.setIn(
[referenceForModel(k8sModels.MachineConfigModel), 'default'],
`
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
labels:
machineconfiguration.openshift.io/role: worker
name: example
spec:
config:
ignition:
version: 3.2.0
storage:
files:
- path: /etc/example-config
mode: 0644
overwrite: true
contents:
source: data:,example%20content
`,
)
.setIn(
Expand Down Expand Up @@ -1164,6 +1186,23 @@ spec:
selector:
matchLabels:
app: hello-openshift
`,
)
.setIn(
[referenceForModel(k8sModels.ServiceMonitorModel), 'default'],
`
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: example
namespace: default
spec:
selector:
matchLabels:
app: example
endpoints:
- port: web
interval: 30s
`,
);

Expand Down