Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1766287: - "hello-openshift" template application wrong binary format #7186

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
77 changes: 71 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 @@ -347,11 +363,23 @@ spec:
labels:
app: hello-openshift
spec:
triggers:
image.openshift.io/triggers: |-
[
{
"from": {
"kind": "ImageStreamTag",
"name": "openshift/hello-openshift:latest"
},
"fieldPath": "spec.template.spec.containers[0].image"
}
]
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down Expand Up @@ -408,9 +436,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 +627,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 +649,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 +782,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 +806,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand All @@ -782,6 +835,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 +858,10 @@ spec:
spec:
containers:
- name: hello-openshift
image: openshift/hello-openshift
image: ${sampleContainerImage}
ports:
- containerPort: 8080
command: ${sampleContainerCmd}
`,
)
.setIn(
Expand Down