diff --git a/frontend/public/components/create-yaml.tsx b/frontend/public/components/create-yaml.tsx index 21ccef8ff74..6dfbeaffb3b 100644 --- a/frontend/public/components/create-yaml.tsx +++ b/frontend/public/components/create-yaml.tsx @@ -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, diff --git a/frontend/public/models/yaml-templates.ts b/frontend/public/models/yaml-templates.ts index e6e2fe2c494..3c22b358520 100644 --- a/frontend/public/models/yaml-templates.ts +++ b/frontend/public/models/yaml-templates.ts @@ -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( @@ -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 `, );