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 11, 2020
1 parent c8489f4 commit 44750c0
Showing 1 changed file with 82 additions and 6 deletions.
88 changes: 82 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 @@ -338,6 +354,17 @@ apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
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:
app: hello-openshift
Expand All @@ -349,9 +376,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down Expand Up @@ -403,14 +431,26 @@ apiVersion: v1
kind: Pod
metadata:
name: example
annotations:
image.openshift.io/triggers: |-
[
{
"from": {
"kind": "ImageStreamTag",
"name": "openshift/hello-openshift:latest"
},
"fieldPath": "spec.template.spec.containers[0].image"
}
]
labels:
app: hello-openshift
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down Expand Up @@ -598,6 +638,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 +660,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 +793,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 +817,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand All @@ -782,6 +846,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 +869,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 44750c0

Please sign in to comment.