Skip to content

Commit

Permalink
template application wrong binary format
Browse files Browse the repository at this point in the history
  • Loading branch information
cyril-ui-developer committed Nov 16, 2020
1 parent dae0335 commit c30f13b
Showing 1 changed file with 60 additions and 6 deletions.
66 changes: 60 additions & 6 deletions frontend/public/models/yaml-templates.ts
Expand Up @@ -7,6 +7,10 @@ import { YAMLTemplate } from '@console/plugin-sdk';
/**
* Sample YAML manifests for some of the statically-defined Kubernetes models.
*/

const sampleContainerImage = 'registry.redhat.io/openshift4/ose-hello-openshift-rhel8';
const sampleContainerCmd = '[ "/bin/bash", "-c", "sleep infinity" ]';

export const baseTemplates = ImmutableMap<GroupVersionKind, ImmutableMap<string, string>>()
.setIn(
['DEFAULT', 'default'],
Expand Down Expand Up @@ -229,6 +233,17 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: example
annotations:
image.openshift.io/triggers: |-
[
{
"from": {
"kind": "ImageStreamTag",
"name": "openshift/hello-openshift:latest"
},
"fieldPath": "spec.template.spec.containers[0].image"
}
]
spec:
selector:
matchLabels:
Expand All @@ -241,9 +256,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down Expand Up @@ -349,9 +365,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down Expand Up @@ -408,9 +425,10 @@ metadata:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down Expand Up @@ -598,6 +616,17 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
name: example
annotations:
image.openshift.io/triggers: |-
[
{
"from": {
"kind": "ImageStreamTag",
"name": "openshift/hello-openshift:latest"
},
"fieldPath": "spec.template.spec.containers[0].image"
}
]
spec:
selector:
matchLabels:
Expand All @@ -609,9 +638,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down Expand Up @@ -741,6 +771,17 @@ apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: example
annotations:
image.openshift.io/triggers: |-
[
{
"from": {
"kind": "ImageStreamTag",
"name": "openshift/hello-openshift:latest"
},
"fieldPath": "spec.template.spec.containers[0].image"
}
]
spec:
replicas: 2
selector:
Expand All @@ -754,9 +795,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand All @@ -782,6 +824,17 @@ apiVersion: v1
kind: ReplicationController
metadata:
name: example
annotations:
image.openshift.io/triggers: |-
[
{
"from": {
"kind": "ImageStreamTag",
"name": "openshift/hello-openshift:latest"
},
"fieldPath": "spec.template.spec.containers[0].image"
}
]
spec:
replicas: 2
selector:
Expand All @@ -794,9 +847,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down

0 comments on commit c30f13b

Please sign in to comment.