forked from LaconicNetwork/kompose
Merge pull request #160 from kadel/add-imagestream
OpenShift - generate DeploymentConfig with ImageStream
This commit is contained in:
commit
55f6e75573
20
Godeps/Godeps.json
generated
20
Godeps/Godeps.json
generated
@ -779,6 +779,26 @@
|
||||
"Comment": "v1.3.0-alpha.2-1281-g2e48c47",
|
||||
"Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/openshift/origin/pkg/image/api/docker10",
|
||||
"Comment": "v1.3.0-alpha.2-1281-g2e48c47",
|
||||
"Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/openshift/origin/pkg/image/api/dockerpre012",
|
||||
"Comment": "v1.3.0-alpha.2-1281-g2e48c47",
|
||||
"Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/openshift/origin/pkg/image/api/install",
|
||||
"Comment": "v1.3.0-alpha.2-1281-g2e48c47",
|
||||
"Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/openshift/origin/pkg/image/api/v1",
|
||||
"Comment": "v1.3.0-alpha.2-1281-g2e48c47",
|
||||
"Rev": "2e48c47ce0371eab4d23ce32c0fec6de2e964dc1"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/openshift/origin/pkg/oauth/api",
|
||||
"Comment": "v1.3.0-alpha.2-1281-g2e48c47",
|
||||
|
||||
@ -28,8 +28,9 @@ import (
|
||||
client "k8s.io/kubernetes/pkg/client/unversioned"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
|
||||
// install OpenShift apis
|
||||
// install OpenShift api
|
||||
_ "github.com/openshift/origin/pkg/deploy/api/install"
|
||||
_ "github.com/openshift/origin/pkg/image/api/install"
|
||||
|
||||
"github.com/skippbox/kompose/pkg/kobject"
|
||||
"github.com/skippbox/kompose/pkg/loader"
|
||||
|
||||
@ -37,6 +37,7 @@ import (
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
|
||||
deployapi "github.com/openshift/origin/pkg/deploy/api"
|
||||
imageapi "github.com/openshift/origin/pkg/image/api"
|
||||
)
|
||||
|
||||
/**
|
||||
@ -177,6 +178,8 @@ func PrintList(objects []runtime.Object, opt kobject.ConvertOptions) error {
|
||||
file = transformer.Print(t.Name, strings.ToLower(t.Kind), data, opt.ToStdout, opt.GenerateYaml, f)
|
||||
case *deployapi.DeploymentConfig:
|
||||
file = transformer.Print(t.Name, strings.ToLower(t.Kind), data, opt.ToStdout, opt.GenerateYaml, f)
|
||||
case *imageapi.ImageStream:
|
||||
file = transformer.Print(t.Name, strings.ToLower(t.Kind), data, opt.ToStdout, opt.GenerateYaml, f)
|
||||
case *api.Service:
|
||||
file = transformer.Print(t.Name, strings.ToLower(t.Kind), data, opt.ToStdout, opt.GenerateYaml, f)
|
||||
}
|
||||
|
||||
@ -18,19 +18,62 @@ package openshift
|
||||
|
||||
import (
|
||||
deployapi "github.com/openshift/origin/pkg/deploy/api"
|
||||
imageapi "github.com/openshift/origin/pkg/image/api"
|
||||
|
||||
"github.com/skippbox/kompose/pkg/kobject"
|
||||
"github.com/skippbox/kompose/pkg/transformer/kubernetes"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
|
||||
"strings"
|
||||
)
|
||||
|
||||
type OpenShift struct {
|
||||
}
|
||||
|
||||
// getImageTag get tag name from image name
|
||||
// if no tag is specified return 'latest'
|
||||
func getImageTag(image string) string {
|
||||
p := strings.Split(image, ":")
|
||||
if len(p) == 2 {
|
||||
return p[1]
|
||||
} else {
|
||||
return "latest"
|
||||
}
|
||||
}
|
||||
|
||||
// initImageStream initialize ImageStream object
|
||||
func initImageStream(name string, service kobject.ServiceConfig) *imageapi.ImageStream {
|
||||
tag := getImageTag(service.Image)
|
||||
|
||||
is := &imageapi.ImageStream{
|
||||
TypeMeta: unversioned.TypeMeta{
|
||||
Kind: "ImageStream",
|
||||
APIVersion: "v1",
|
||||
},
|
||||
ObjectMeta: api.ObjectMeta{
|
||||
Name: name,
|
||||
},
|
||||
Spec: imageapi.ImageStreamSpec{
|
||||
Tags: map[string]imageapi.TagReference{
|
||||
tag: imageapi.TagReference{
|
||||
From: &api.ObjectReference{
|
||||
Kind: "DockerImage",
|
||||
Name: service.Image,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
return is
|
||||
}
|
||||
|
||||
// initDeploymentConfig initialize OpenShifts DeploymentConfig object
|
||||
func initDeploymentConfig(name string, service kobject.ServiceConfig, replicas int) *deployapi.DeploymentConfig {
|
||||
tag := getImageTag(service.Image)
|
||||
|
||||
dc := &deployapi.DeploymentConfig{
|
||||
TypeMeta: unversioned.TypeMeta{
|
||||
Kind: "DeploymentConfig",
|
||||
@ -51,8 +94,27 @@ func initDeploymentConfig(name string, service kobject.ServiceConfig, replicas i
|
||||
Spec: api.PodSpec{
|
||||
Containers: []api.Container{
|
||||
{
|
||||
Name: name,
|
||||
Image: service.Image,
|
||||
Name: name,
|
||||
// Image will be set to ImageStream image by ImageChange trigger.
|
||||
Image: " ",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Triggers: []deployapi.DeploymentTriggerPolicy{
|
||||
// Trigger new deploy when DeploymentConfig is created (config change)
|
||||
deployapi.DeploymentTriggerPolicy{
|
||||
Type: deployapi.DeploymentTriggerOnConfigChange,
|
||||
},
|
||||
deployapi.DeploymentTriggerPolicy{
|
||||
Type: deployapi.DeploymentTriggerOnImageChange,
|
||||
ImageChangeParams: &deployapi.DeploymentTriggerImageChangeParams{
|
||||
//Automatic - if new tag is detected - update image update inside the pod template
|
||||
Automatic: true,
|
||||
ContainerNames: []string{name},
|
||||
From: api.ObjectReference{
|
||||
Name: name + ":" + tag,
|
||||
Kind: "ImageStreamTag",
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -73,6 +135,8 @@ func (k *OpenShift) Transform(komposeObject kobject.KomposeObject, opt kobject.C
|
||||
|
||||
if opt.CreateDeploymentConfig {
|
||||
objects = append(objects, initDeploymentConfig(name, service, opt.Replicas)) // OpenShift DeploymentConfigs
|
||||
// create ImageStream after deployment (creating IS will trigger new deployment)
|
||||
objects = append(objects, initImageStream(name, service))
|
||||
}
|
||||
|
||||
// If ports not provided in configuration we will not make service
|
||||
|
||||
@ -17,7 +17,24 @@
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"base"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "base:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
@ -34,7 +51,7 @@
|
||||
"containers": [
|
||||
{
|
||||
"name": "base",
|
||||
"image": "busybox",
|
||||
"image": " ",
|
||||
"command": [
|
||||
"echo"
|
||||
],
|
||||
@ -49,6 +66,31 @@
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "base",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "busybox"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
220
script/test/fixtures/etherpad/output-os.json
vendored
220
script/test/fixtures/etherpad/output-os.json
vendored
@ -4,73 +4,31 @@
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "etherpad",
|
||||
"name": "mariadb",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "etherpad"
|
||||
"service": "mariadb"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "etherpad"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "etherpad"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "etherpad",
|
||||
"image": "centos/etherpad",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 9001,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DB_USER",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_DBID",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_HOST",
|
||||
"value": "mariadb"
|
||||
},
|
||||
{
|
||||
"name": "DB_PASS",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_PORT",
|
||||
"value": "3306"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
"ports": [
|
||||
{
|
||||
"name": "3306",
|
||||
"protocol": "TCP",
|
||||
"port": 3306,
|
||||
"targetPort": 3306
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"service": "mariadb"
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
@ -113,7 +71,24 @@
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"mariadb"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "mariadb:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
@ -130,7 +105,7 @@
|
||||
"containers": [
|
||||
{
|
||||
"name": "mariadb",
|
||||
"image": "centos/mariadb",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 3306,
|
||||
@ -165,30 +140,139 @@
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "mariadb",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "centos/mariadb"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "etherpad",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "mariadb"
|
||||
"service": "etherpad"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"name": "3306",
|
||||
"protocol": "TCP",
|
||||
"port": 3306,
|
||||
"targetPort": 3306
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"etherpad"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "etherpad:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "mariadb"
|
||||
"service": "etherpad"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "etherpad"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "etherpad",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 9001,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DB_USER",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_DBID",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_HOST",
|
||||
"value": "mariadb"
|
||||
},
|
||||
{
|
||||
"name": "DB_PASS",
|
||||
"value": "etherpad"
|
||||
},
|
||||
{
|
||||
"name": "DB_PORT",
|
||||
"value": "3306"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "etherpad",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "centos/etherpad"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
372
script/test/fixtures/gitlab/output-os.json
vendored
372
script/test/fixtures/gitlab/output-os.json
vendored
@ -3,95 +3,6 @@
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "gitlab",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "gitlab"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "gitlab"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "gitlab"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "gitlab",
|
||||
"image": "swordphilic/gitlab",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80,
|
||||
"protocol": "TCP"
|
||||
},
|
||||
{
|
||||
"containerPort": 443,
|
||||
"protocol": "TCP"
|
||||
},
|
||||
{
|
||||
"containerPort": 22,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DB_HOST",
|
||||
"value": "postgresql"
|
||||
},
|
||||
{
|
||||
"name": "DB_NAME",
|
||||
"value": "gitlab"
|
||||
},
|
||||
{
|
||||
"name": "DB_PASS",
|
||||
"value": "gitlab"
|
||||
},
|
||||
{
|
||||
"name": "DB_PORT",
|
||||
"value": "5432"
|
||||
},
|
||||
{
|
||||
"name": "DB_TYPE",
|
||||
"value": "postgres"
|
||||
},
|
||||
{
|
||||
"name": "DB_USER",
|
||||
"value": "gitlab"
|
||||
},
|
||||
{
|
||||
"name": "REDIS_HOST",
|
||||
"value": "redis"
|
||||
},
|
||||
{
|
||||
"name": "REDIS_PORT",
|
||||
"value": "6379"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
@ -131,6 +42,191 @@
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "postgresql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "postgresql"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "5432",
|
||||
"protocol": "TCP",
|
||||
"port": 5432,
|
||||
"targetPort": 5432
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"service": "postgresql"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"service": "redis"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "gitlab",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "gitlab"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"gitlab"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "gitlab:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "gitlab"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "gitlab"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "gitlab",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80,
|
||||
"protocol": "TCP"
|
||||
},
|
||||
{
|
||||
"containerPort": 443,
|
||||
"protocol": "TCP"
|
||||
},
|
||||
{
|
||||
"containerPort": 22,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"env": [
|
||||
{
|
||||
"name": "DB_NAME",
|
||||
"value": "gitlab"
|
||||
},
|
||||
{
|
||||
"name": "DB_PASS",
|
||||
"value": "gitlab"
|
||||
},
|
||||
{
|
||||
"name": "DB_PORT",
|
||||
"value": "5432"
|
||||
},
|
||||
{
|
||||
"name": "DB_TYPE",
|
||||
"value": "postgres"
|
||||
},
|
||||
{
|
||||
"name": "DB_USER",
|
||||
"value": "gitlab"
|
||||
},
|
||||
{
|
||||
"name": "REDIS_HOST",
|
||||
"value": "redis"
|
||||
},
|
||||
{
|
||||
"name": "REDIS_PORT",
|
||||
"value": "6379"
|
||||
},
|
||||
{
|
||||
"name": "DB_HOST",
|
||||
"value": "postgresql"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "gitlab",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "swordphilic/gitlab"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
@ -145,7 +241,24 @@
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"postgresql"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "postgresql:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
@ -162,7 +275,7 @@
|
||||
"containers": [
|
||||
{
|
||||
"name": "postgresql",
|
||||
"image": "swordphilic/postgresql",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5432,
|
||||
@ -193,30 +306,28 @@
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "postgresql",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "postgresql"
|
||||
}
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
"tags": [
|
||||
{
|
||||
"name": "5432",
|
||||
"protocol": "TCP",
|
||||
"port": 5432,
|
||||
"targetPort": 5432
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "swordphilic/postgresql"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"service": "postgresql"
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -233,7 +344,24 @@
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
@ -250,7 +378,7 @@
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "swordphilic/redis",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
@ -267,30 +395,28 @@
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "redis"
|
||||
}
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"ports": [
|
||||
"tags": [
|
||||
{
|
||||
"name": "6379",
|
||||
"protocol": "TCP",
|
||||
"port": 6379,
|
||||
"targetPort": 6379
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "swordphilic/redis"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
],
|
||||
"selector": {
|
||||
"service": "redis"
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
672
script/test/fixtures/ngnix-node-redis/output-os.json
vendored
672
script/test/fixtures/ngnix-node-redis/output-os.json
vendored
@ -3,52 +3,6 @@
|
||||
"apiVersion": "v1",
|
||||
"metadata": {},
|
||||
"items": [
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node2",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node2"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "node2"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node2"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "node2",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
@ -76,52 +30,6 @@
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node3",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node3"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "node3"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node3"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "node3",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
@ -149,53 +57,6 @@
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "redis",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
@ -223,52 +84,6 @@
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "nginx",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "nginx"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "nginx"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "nginx"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "nginx",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
@ -296,52 +111,6 @@
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node1"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "node1"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node1"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "node1",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "Service",
|
||||
"apiVersion": "v1",
|
||||
@ -368,6 +137,447 @@
|
||||
"status": {
|
||||
"loadBalancer": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node2",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node2"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"node2"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "node2:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "node2"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node2"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "node2",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node2",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node3",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node3"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"node3"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "node3:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "node3"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node3"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "node3",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node3",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "redis"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "redis"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "nginx",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "nginx"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"nginx"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "nginx:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "nginx"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "nginx"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "nginx",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 80,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "nginx",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node1",
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node1"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"node1"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "node1:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
"service": "node1"
|
||||
},
|
||||
"template": {
|
||||
"metadata": {
|
||||
"creationTimestamp": null,
|
||||
"labels": {
|
||||
"service": "node1"
|
||||
}
|
||||
},
|
||||
"spec": {
|
||||
"containers": [
|
||||
{
|
||||
"name": "node1",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 8080,
|
||||
"protocol": "TCP"
|
||||
}
|
||||
],
|
||||
"resources": {}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "node1",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -77,7 +77,24 @@
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"redis"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "redis:3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
@ -94,7 +111,7 @@
|
||||
"containers": [
|
||||
{
|
||||
"name": "redis",
|
||||
"image": "redis:3.0",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 6379,
|
||||
@ -114,6 +131,31 @@
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "redis",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "3.0",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "redis:3.0"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "DeploymentConfig",
|
||||
"apiVersion": "v1",
|
||||
@ -128,7 +170,24 @@
|
||||
"strategy": {
|
||||
"resources": {}
|
||||
},
|
||||
"triggers": null,
|
||||
"triggers": [
|
||||
{
|
||||
"type": "ConfigChange"
|
||||
},
|
||||
{
|
||||
"type": "ImageChange",
|
||||
"imageChangeParams": {
|
||||
"automatic": true,
|
||||
"containerNames": [
|
||||
"web"
|
||||
],
|
||||
"from": {
|
||||
"kind": "ImageStreamTag",
|
||||
"name": "web:latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"replicas": 1,
|
||||
"test": false,
|
||||
"selector": {
|
||||
@ -145,7 +204,7 @@
|
||||
"containers": [
|
||||
{
|
||||
"name": "web",
|
||||
"image": "tuna/docker-counter23",
|
||||
"image": " ",
|
||||
"ports": [
|
||||
{
|
||||
"containerPort": 5000,
|
||||
@ -160,6 +219,31 @@
|
||||
}
|
||||
},
|
||||
"status": {}
|
||||
},
|
||||
{
|
||||
"kind": "ImageStream",
|
||||
"apiVersion": "v1",
|
||||
"metadata": {
|
||||
"name": "web",
|
||||
"creationTimestamp": null
|
||||
},
|
||||
"spec": {
|
||||
"tags": [
|
||||
{
|
||||
"name": "latest",
|
||||
"annotations": null,
|
||||
"from": {
|
||||
"kind": "DockerImage",
|
||||
"name": "tuna/docker-counter23"
|
||||
},
|
||||
"generation": null,
|
||||
"importPolicy": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": {
|
||||
"dockerImageRepository": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
54
vendor/github.com/openshift/origin/pkg/image/api/docker10/dockertypes.go
generated
vendored
Normal file
54
vendor/github.com/openshift/origin/pkg/image/api/docker10/dockertypes.go
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
package docker10
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
)
|
||||
|
||||
// DockerImage is the type representing a docker image and its various properties when
|
||||
// retrieved from the Docker client API.
|
||||
type DockerImage struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
|
||||
ID string `json:"Id"`
|
||||
Parent string `json:"Parent,omitempty"`
|
||||
Comment string `json:"Comment,omitempty"`
|
||||
Created unversioned.Time `json:"Created,omitempty"`
|
||||
Container string `json:"Container,omitempty"`
|
||||
ContainerConfig DockerConfig `json:"ContainerConfig,omitempty"`
|
||||
DockerVersion string `json:"DockerVersion,omitempty"`
|
||||
Author string `json:"Author,omitempty"`
|
||||
Config *DockerConfig `json:"Config,omitempty"`
|
||||
Architecture string `json:"Architecture,omitempty"`
|
||||
Size int64 `json:"Size,omitempty"`
|
||||
}
|
||||
|
||||
// DockerConfig is the list of configuration options used when creating a container.
|
||||
type DockerConfig struct {
|
||||
Hostname string `json:"Hostname,omitempty"`
|
||||
Domainname string `json:"Domainname,omitempty"`
|
||||
User string `json:"User,omitempty"`
|
||||
Memory int64 `json:"Memory,omitempty"`
|
||||
MemorySwap int64 `json:"MemorySwap,omitempty"`
|
||||
CPUShares int64 `json:"CpuShares,omitempty"`
|
||||
CPUSet string `json:"Cpuset,omitempty"`
|
||||
AttachStdin bool `json:"AttachStdin,omitempty"`
|
||||
AttachStdout bool `json:"AttachStdout,omitempty"`
|
||||
AttachStderr bool `json:"AttachStderr,omitempty"`
|
||||
PortSpecs []string `json:"PortSpecs,omitempty"`
|
||||
ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"`
|
||||
Tty bool `json:"Tty,omitempty"`
|
||||
OpenStdin bool `json:"OpenStdin,omitempty"`
|
||||
StdinOnce bool `json:"StdinOnce,omitempty"`
|
||||
Env []string `json:"Env,omitempty"`
|
||||
Cmd []string `json:"Cmd,omitempty"`
|
||||
DNS []string `json:"Dns,omitempty"` // For Docker API v1.9 and below only
|
||||
Image string `json:"Image,omitempty"`
|
||||
Volumes map[string]struct{} `json:"Volumes,omitempty"`
|
||||
VolumesFrom string `json:"VolumesFrom,omitempty"`
|
||||
WorkingDir string `json:"WorkingDir,omitempty"`
|
||||
Entrypoint []string `json:"Entrypoint,omitempty"`
|
||||
NetworkDisabled bool `json:"NetworkDisabled,omitempty"`
|
||||
SecurityOpts []string `json:"SecurityOpts,omitempty"`
|
||||
OnBuild []string `json:"OnBuild,omitempty"`
|
||||
Labels map[string]string `json:"Labels,omitempty"`
|
||||
}
|
||||
24
vendor/github.com/openshift/origin/pkg/image/api/docker10/register.go
generated
vendored
Normal file
24
vendor/github.com/openshift/origin/pkg/image/api/docker10/register.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
package docker10
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
const GroupName = ""
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "1.0"}
|
||||
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
addKnownTypes(scheme)
|
||||
}
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&DockerImage{},
|
||||
)
|
||||
}
|
||||
|
||||
func (obj *DockerImage) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
60
vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/conversion.go
generated
vendored
Normal file
60
vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/conversion.go
generated
vendored
Normal file
@ -0,0 +1,60 @@
|
||||
package dockerpre012
|
||||
|
||||
import (
|
||||
"github.com/fsouza/go-dockerclient"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/conversion"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
|
||||
newer "github.com/openshift/origin/pkg/image/api"
|
||||
)
|
||||
|
||||
// Convert docker client object to internal object, but only when this package is included
|
||||
func Convert_dockerpre012_ImagePre_012_to_api_DockerImage(in *docker.ImagePre012, out *newer.DockerImage, s conversion.Scope) error {
|
||||
if err := s.Convert(in.Config, &out.Config, conversion.AllowDifferentFieldTypeNames); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.ContainerConfig, &out.ContainerConfig, conversion.AllowDifferentFieldTypeNames); err != nil {
|
||||
return err
|
||||
}
|
||||
out.ID = in.ID
|
||||
out.Parent = in.Parent
|
||||
out.Comment = in.Comment
|
||||
out.Created = unversioned.NewTime(in.Created)
|
||||
out.Container = in.Container
|
||||
out.DockerVersion = in.DockerVersion
|
||||
out.Author = in.Author
|
||||
out.Architecture = in.Architecture
|
||||
out.Size = in.Size
|
||||
return nil
|
||||
}
|
||||
func Convert_api_DockerImage_to_dockerpre012_ImagePre_012(in *newer.DockerImage, out *docker.ImagePre012, s conversion.Scope) error {
|
||||
if err := s.Convert(&in.Config, &out.Config, conversion.AllowDifferentFieldTypeNames); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&in.ContainerConfig, &out.ContainerConfig, conversion.AllowDifferentFieldTypeNames); err != nil {
|
||||
return err
|
||||
}
|
||||
out.ID = in.ID
|
||||
out.Parent = in.Parent
|
||||
out.Comment = in.Comment
|
||||
out.Created = in.Created.Time
|
||||
out.Container = in.Container
|
||||
out.DockerVersion = in.DockerVersion
|
||||
out.Author = in.Author
|
||||
out.Architecture = in.Architecture
|
||||
out.Size = in.Size
|
||||
return nil
|
||||
}
|
||||
|
||||
func addConversionFuncs(scheme *runtime.Scheme) {
|
||||
err := scheme.AddConversionFuncs(
|
||||
Convert_dockerpre012_ImagePre_012_to_api_DockerImage,
|
||||
Convert_api_DockerImage_to_dockerpre012_ImagePre_012,
|
||||
)
|
||||
if err != nil {
|
||||
// If one of the conversion functions is malformed, detect it immediately.
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
55
vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/dockertypes.go
generated
vendored
Normal file
55
vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/dockertypes.go
generated
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
package dockerpre012
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
)
|
||||
|
||||
// DockerImage is for earlier versions of the Docker API (pre-012 to be specific). It is also the
|
||||
// version of metadata that the Docker registry uses to persist metadata.
|
||||
type DockerImage struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
|
||||
ID string `json:"id"`
|
||||
Parent string `json:"parent,omitempty"`
|
||||
Comment string `json:"comment,omitempty"`
|
||||
Created unversioned.Time `json:"created"`
|
||||
Container string `json:"container,omitempty"`
|
||||
ContainerConfig DockerConfig `json:"container_config,omitempty"`
|
||||
DockerVersion string `json:"docker_version,omitempty"`
|
||||
Author string `json:"author,omitempty"`
|
||||
Config *DockerConfig `json:"config,omitempty"`
|
||||
Architecture string `json:"architecture,omitempty"`
|
||||
Size int64 `json:"size,omitempty"`
|
||||
}
|
||||
|
||||
// DockerConfig is the list of configuration options used when creating a container.
|
||||
type DockerConfig struct {
|
||||
Hostname string `json:"Hostname,omitempty"`
|
||||
Domainname string `json:"Domainname,omitempty"`
|
||||
User string `json:"User,omitempty"`
|
||||
Memory int64 `json:"Memory,omitempty"`
|
||||
MemorySwap int64 `json:"MemorySwap,omitempty"`
|
||||
CPUShares int64 `json:"CpuShares,omitempty"`
|
||||
CPUSet string `json:"Cpuset,omitempty"`
|
||||
AttachStdin bool `json:"AttachStdin,omitempty"`
|
||||
AttachStdout bool `json:"AttachStdout,omitempty"`
|
||||
AttachStderr bool `json:"AttachStderr,omitempty"`
|
||||
PortSpecs []string `json:"PortSpecs,omitempty"`
|
||||
ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"`
|
||||
Tty bool `json:"Tty,omitempty"`
|
||||
OpenStdin bool `json:"OpenStdin,omitempty"`
|
||||
StdinOnce bool `json:"StdinOnce,omitempty"`
|
||||
Env []string `json:"Env,omitempty"`
|
||||
Cmd []string `json:"Cmd,omitempty"`
|
||||
DNS []string `json:"Dns,omitempty"` // For Docker API v1.9 and below only
|
||||
Image string `json:"Image,omitempty"`
|
||||
Volumes map[string]struct{} `json:"Volumes,omitempty"`
|
||||
VolumesFrom string `json:"VolumesFrom,omitempty"`
|
||||
WorkingDir string `json:"WorkingDir,omitempty"`
|
||||
Entrypoint []string `json:"Entrypoint,omitempty"`
|
||||
NetworkDisabled bool `json:"NetworkDisabled,omitempty"`
|
||||
SecurityOpts []string `json:"SecurityOpts,omitempty"`
|
||||
OnBuild []string `json:"OnBuild,omitempty"`
|
||||
// This field is not supported in pre012 and will always be empty.
|
||||
Labels map[string]string `json:"Labels,omitempty"`
|
||||
}
|
||||
25
vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/register.go
generated
vendored
Normal file
25
vendor/github.com/openshift/origin/pkg/image/api/dockerpre012/register.go
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
package dockerpre012
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
const GroupName = ""
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "pre012"}
|
||||
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
addKnownTypes(scheme)
|
||||
addConversionFuncs(scheme)
|
||||
}
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&DockerImage{},
|
||||
)
|
||||
}
|
||||
|
||||
func (obj *DockerImage) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
127
vendor/github.com/openshift/origin/pkg/image/api/install/install.go
generated
vendored
Normal file
127
vendor/github.com/openshift/origin/pkg/image/api/install/install.go
generated
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
package install
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
||||
kapi "k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/meta"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/apimachinery"
|
||||
"k8s.io/kubernetes/pkg/apimachinery/registered"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
"k8s.io/kubernetes/pkg/util/sets"
|
||||
|
||||
"github.com/openshift/origin/pkg/image/api"
|
||||
"github.com/openshift/origin/pkg/image/api/docker10"
|
||||
"github.com/openshift/origin/pkg/image/api/dockerpre012"
|
||||
"github.com/openshift/origin/pkg/image/api/v1"
|
||||
)
|
||||
|
||||
const importPrefix = "github.com/openshift/origin/pkg/image/api"
|
||||
|
||||
var accessor = meta.NewAccessor()
|
||||
|
||||
// availableVersions lists all known external versions for this group from most preferred to least preferred
|
||||
var availableVersions = []unversioned.GroupVersion{v1.SchemeGroupVersion, docker10.SchemeGroupVersion, dockerpre012.SchemeGroupVersion}
|
||||
|
||||
func init() {
|
||||
registered.RegisterVersions(availableVersions)
|
||||
externalVersions := []unversioned.GroupVersion{}
|
||||
for _, v := range availableVersions {
|
||||
if registered.IsAllowedVersion(v) {
|
||||
externalVersions = append(externalVersions, v)
|
||||
}
|
||||
}
|
||||
if len(externalVersions) == 0 {
|
||||
glog.Infof("No version is registered for group %v", api.GroupName)
|
||||
return
|
||||
}
|
||||
|
||||
if err := registered.EnableVersions(externalVersions...); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err := enableVersions(externalVersions); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: enableVersions should be centralized rather than spread in each API
|
||||
// group.
|
||||
// We can combine registered.RegisterVersions, registered.EnableVersions and
|
||||
// registered.RegisterGroup once we have moved enableVersions there.
|
||||
func enableVersions(externalVersions []unversioned.GroupVersion) error {
|
||||
addVersionsToScheme(externalVersions...)
|
||||
preferredExternalVersion := externalVersions[0]
|
||||
|
||||
groupMeta := apimachinery.GroupMeta{
|
||||
GroupVersion: preferredExternalVersion,
|
||||
GroupVersions: externalVersions,
|
||||
RESTMapper: newRESTMapper(externalVersions),
|
||||
SelfLinker: runtime.SelfLinker(accessor),
|
||||
InterfacesFor: interfacesFor,
|
||||
}
|
||||
|
||||
if err := registered.RegisterGroup(groupMeta); err != nil {
|
||||
return err
|
||||
}
|
||||
kapi.RegisterRESTMapper(groupMeta.RESTMapper)
|
||||
return nil
|
||||
}
|
||||
|
||||
func addVersionsToScheme(externalVersions ...unversioned.GroupVersion) {
|
||||
// add the internal version to Scheme
|
||||
api.AddToScheme(kapi.Scheme)
|
||||
// add the enabled external versions to Scheme
|
||||
for _, v := range externalVersions {
|
||||
if !registered.IsEnabledVersion(v) {
|
||||
glog.Errorf("Version %s is not enabled, so it will not be added to the Scheme.", v)
|
||||
continue
|
||||
}
|
||||
switch v {
|
||||
case v1.SchemeGroupVersion:
|
||||
v1.AddToScheme(kapi.Scheme)
|
||||
case docker10.SchemeGroupVersion:
|
||||
docker10.AddToScheme(kapi.Scheme)
|
||||
case dockerpre012.SchemeGroupVersion:
|
||||
dockerpre012.AddToScheme(kapi.Scheme)
|
||||
|
||||
default:
|
||||
glog.Errorf("Version %s is not known, so it will not be added to the Scheme.", v)
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func newRESTMapper(externalVersions []unversioned.GroupVersion) meta.RESTMapper {
|
||||
rootScoped := sets.NewString("Image")
|
||||
ignoredKinds := sets.NewString()
|
||||
return kapi.NewDefaultRESTMapper(externalVersions, interfacesFor, importPrefix, ignoredKinds, rootScoped)
|
||||
}
|
||||
|
||||
func interfacesFor(version unversioned.GroupVersion) (*meta.VersionInterfaces, error) {
|
||||
switch version {
|
||||
case v1.SchemeGroupVersion:
|
||||
return &meta.VersionInterfaces{
|
||||
ObjectConvertor: kapi.Scheme,
|
||||
MetadataAccessor: accessor,
|
||||
}, nil
|
||||
|
||||
case docker10.SchemeGroupVersion:
|
||||
return &meta.VersionInterfaces{
|
||||
ObjectConvertor: kapi.Scheme,
|
||||
MetadataAccessor: accessor,
|
||||
}, nil
|
||||
|
||||
case dockerpre012.SchemeGroupVersion:
|
||||
return &meta.VersionInterfaces{
|
||||
ObjectConvertor: kapi.Scheme,
|
||||
MetadataAccessor: accessor,
|
||||
}, nil
|
||||
|
||||
default:
|
||||
g, _ := registered.Group(api.GroupName)
|
||||
return nil, fmt.Errorf("unsupported storage version: %s (valid: %v)", version, g.GroupVersions)
|
||||
}
|
||||
}
|
||||
290
vendor/github.com/openshift/origin/pkg/image/api/v1/conversion.go
generated
vendored
Normal file
290
vendor/github.com/openshift/origin/pkg/image/api/v1/conversion.go
generated
vendored
Normal file
@ -0,0 +1,290 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/conversion"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
|
||||
oapi "github.com/openshift/origin/pkg/api"
|
||||
newer "github.com/openshift/origin/pkg/image/api"
|
||||
)
|
||||
|
||||
// The docker metadata must be cast to a version
|
||||
func Convert_api_Image_To_v1_Image(in *newer.Image, out *Image, s conversion.Scope) error {
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
out.DockerImageReference = in.DockerImageReference
|
||||
out.DockerImageManifest = in.DockerImageManifest
|
||||
out.DockerImageManifestMediaType = in.DockerImageManifestMediaType
|
||||
out.DockerImageConfig = in.DockerImageConfig
|
||||
|
||||
gvString := in.DockerImageMetadataVersion
|
||||
if len(gvString) == 0 {
|
||||
gvString = "1.0"
|
||||
}
|
||||
if !strings.Contains(gvString, "/") {
|
||||
gvString = "/" + gvString
|
||||
}
|
||||
|
||||
version, err := unversioned.ParseGroupVersion(gvString)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
data, err := runtime.Encode(api.Codecs.LegacyCodec(version), &in.DockerImageMetadata)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
out.DockerImageMetadata.Raw = data
|
||||
out.DockerImageMetadataVersion = version.Version
|
||||
|
||||
if in.DockerImageLayers != nil {
|
||||
out.DockerImageLayers = make([]ImageLayer, len(in.DockerImageLayers))
|
||||
for i := range in.DockerImageLayers {
|
||||
out.DockerImageLayers[i].MediaType = in.DockerImageLayers[i].MediaType
|
||||
out.DockerImageLayers[i].Name = in.DockerImageLayers[i].Name
|
||||
out.DockerImageLayers[i].LayerSize = in.DockerImageLayers[i].LayerSize
|
||||
}
|
||||
} else {
|
||||
out.DockerImageLayers = nil
|
||||
}
|
||||
|
||||
if in.Signatures != nil {
|
||||
out.Signatures = make([]ImageSignature, len(in.Signatures))
|
||||
for i := range in.Signatures {
|
||||
if err := s.Convert(&in.Signatures[i], &out.Signatures[i], 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Signatures = nil
|
||||
}
|
||||
|
||||
if in.DockerImageSignatures != nil {
|
||||
out.DockerImageSignatures = nil
|
||||
for _, v := range in.DockerImageSignatures {
|
||||
out.DockerImageSignatures = append(out.DockerImageSignatures, v)
|
||||
}
|
||||
} else {
|
||||
out.DockerImageSignatures = nil
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_Image_To_api_Image(in *Image, out *newer.Image, s conversion.Scope) error {
|
||||
if err := s.Convert(&in.ObjectMeta, &out.ObjectMeta, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
out.DockerImageReference = in.DockerImageReference
|
||||
out.DockerImageManifest = in.DockerImageManifest
|
||||
out.DockerImageManifestMediaType = in.DockerImageManifestMediaType
|
||||
out.DockerImageConfig = in.DockerImageConfig
|
||||
|
||||
version := in.DockerImageMetadataVersion
|
||||
if len(version) == 0 {
|
||||
version = "1.0"
|
||||
}
|
||||
if len(in.DockerImageMetadata.Raw) > 0 {
|
||||
// TODO: add a way to default the expected kind and version of an object if not set
|
||||
obj, err := api.Scheme.New(unversioned.GroupVersionKind{Version: version, Kind: "DockerImage"})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := runtime.DecodeInto(api.Codecs.UniversalDecoder(), in.DockerImageMetadata.Raw, obj); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(obj, &out.DockerImageMetadata, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
out.DockerImageMetadataVersion = version
|
||||
|
||||
if in.DockerImageLayers != nil {
|
||||
out.DockerImageLayers = make([]newer.ImageLayer, len(in.DockerImageLayers))
|
||||
for i := range in.DockerImageLayers {
|
||||
out.DockerImageLayers[i].MediaType = in.DockerImageLayers[i].MediaType
|
||||
out.DockerImageLayers[i].Name = in.DockerImageLayers[i].Name
|
||||
out.DockerImageLayers[i].LayerSize = in.DockerImageLayers[i].LayerSize
|
||||
}
|
||||
} else {
|
||||
out.DockerImageLayers = nil
|
||||
}
|
||||
|
||||
if in.Signatures != nil {
|
||||
out.Signatures = make([]newer.ImageSignature, len(in.Signatures))
|
||||
for i := range in.Signatures {
|
||||
if err := s.Convert(&in.Signatures[i], &out.Signatures[i], 0); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Signatures = nil
|
||||
}
|
||||
|
||||
if in.DockerImageSignatures != nil {
|
||||
out.DockerImageSignatures = nil
|
||||
for _, v := range in.DockerImageSignatures {
|
||||
out.DockerImageSignatures = append(out.DockerImageSignatures, v)
|
||||
}
|
||||
} else {
|
||||
out.DockerImageSignatures = nil
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func Convert_v1_ImageStreamSpec_To_api_ImageStreamSpec(in *ImageStreamSpec, out *newer.ImageStreamSpec, s conversion.Scope) error {
|
||||
out.DockerImageRepository = in.DockerImageRepository
|
||||
out.Tags = make(map[string]newer.TagReference)
|
||||
return s.Convert(&in.Tags, &out.Tags, 0)
|
||||
}
|
||||
|
||||
func Convert_api_ImageStreamSpec_To_v1_ImageStreamSpec(in *newer.ImageStreamSpec, out *ImageStreamSpec, s conversion.Scope) error {
|
||||
out.DockerImageRepository = in.DockerImageRepository
|
||||
if len(in.DockerImageRepository) > 0 {
|
||||
// ensure that stored image references have no tag or ID, which was possible from 1.0.0 until 1.0.7
|
||||
if ref, err := newer.ParseDockerImageReference(in.DockerImageRepository); err == nil {
|
||||
if len(ref.Tag) > 0 || len(ref.ID) > 0 {
|
||||
ref.Tag, ref.ID = "", ""
|
||||
out.DockerImageRepository = ref.Exact()
|
||||
}
|
||||
}
|
||||
}
|
||||
out.Tags = make([]TagReference, 0, 0)
|
||||
return s.Convert(&in.Tags, &out.Tags, 0)
|
||||
}
|
||||
|
||||
func Convert_v1_ImageStreamStatus_To_api_ImageStreamStatus(in *ImageStreamStatus, out *newer.ImageStreamStatus, s conversion.Scope) error {
|
||||
out.DockerImageRepository = in.DockerImageRepository
|
||||
out.Tags = make(map[string]newer.TagEventList)
|
||||
return s.Convert(&in.Tags, &out.Tags, 0)
|
||||
}
|
||||
|
||||
func Convert_api_ImageStreamStatus_To_v1_ImageStreamStatus(in *newer.ImageStreamStatus, out *ImageStreamStatus, s conversion.Scope) error {
|
||||
out.DockerImageRepository = in.DockerImageRepository
|
||||
if len(in.DockerImageRepository) > 0 {
|
||||
// ensure that stored image references have no tag or ID, which was possible from 1.0.0 until 1.0.7
|
||||
if ref, err := newer.ParseDockerImageReference(in.DockerImageRepository); err == nil {
|
||||
if len(ref.Tag) > 0 || len(ref.ID) > 0 {
|
||||
ref.Tag, ref.ID = "", ""
|
||||
out.DockerImageRepository = ref.Exact()
|
||||
}
|
||||
}
|
||||
}
|
||||
out.Tags = make([]NamedTagEventList, 0, 0)
|
||||
return s.Convert(&in.Tags, &out.Tags, 0)
|
||||
}
|
||||
|
||||
func Convert_api_ImageStreamMapping_To_v1_ImageStreamMapping(in *newer.ImageStreamMapping, out *ImageStreamMapping, s conversion.Scope) error {
|
||||
return s.DefaultConvert(in, out, conversion.DestFromSource)
|
||||
}
|
||||
|
||||
func Convert_v1_ImageStreamMapping_To_api_ImageStreamMapping(in *ImageStreamMapping, out *newer.ImageStreamMapping, s conversion.Scope) error {
|
||||
return s.DefaultConvert(in, out, conversion.SourceToDest)
|
||||
}
|
||||
|
||||
func Convert_v1_NamedTagEventListArray_to_api_TagEventListArray(in *[]NamedTagEventList, out *map[string]newer.TagEventList, s conversion.Scope) error {
|
||||
for _, curr := range *in {
|
||||
newTagEventList := newer.TagEventList{}
|
||||
if err := s.Convert(&curr.Conditions, &newTagEventList.Conditions, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&curr.Items, &newTagEventList.Items, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
(*out)[curr.Tag] = newTagEventList
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
func Convert_api_TagEventListArray_to_v1_NamedTagEventListArray(in *map[string]newer.TagEventList, out *[]NamedTagEventList, s conversion.Scope) error {
|
||||
allKeys := make([]string, 0, len(*in))
|
||||
for key := range *in {
|
||||
allKeys = append(allKeys, key)
|
||||
}
|
||||
sort.Strings(allKeys)
|
||||
|
||||
for _, key := range allKeys {
|
||||
newTagEventList := (*in)[key]
|
||||
oldTagEventList := &NamedTagEventList{Tag: key}
|
||||
if err := s.Convert(&newTagEventList.Conditions, &oldTagEventList.Conditions, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.Convert(&newTagEventList.Items, &oldTagEventList.Items, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*out = append(*out, *oldTagEventList)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
func Convert_v1_TagReferenceArray_to_api_TagReferenceMap(in *[]TagReference, out *map[string]newer.TagReference, s conversion.Scope) error {
|
||||
for _, curr := range *in {
|
||||
r := newer.TagReference{}
|
||||
if err := s.Convert(&curr, &r, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
(*out)[curr.Name] = r
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func Convert_api_TagReferenceMap_to_v1_TagReferenceArray(in *map[string]newer.TagReference, out *[]TagReference, s conversion.Scope) error {
|
||||
allTags := make([]string, 0, len(*in))
|
||||
for tag := range *in {
|
||||
allTags = append(allTags, tag)
|
||||
}
|
||||
sort.Strings(allTags)
|
||||
|
||||
for _, tag := range allTags {
|
||||
newTagReference := (*in)[tag]
|
||||
oldTagReference := TagReference{}
|
||||
if err := s.Convert(&newTagReference, &oldTagReference, 0); err != nil {
|
||||
return err
|
||||
}
|
||||
oldTagReference.Name = tag
|
||||
*out = append(*out, oldTagReference)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func addConversionFuncs(scheme *runtime.Scheme) {
|
||||
err := scheme.AddConversionFuncs(
|
||||
Convert_v1_NamedTagEventListArray_to_api_TagEventListArray,
|
||||
Convert_api_TagEventListArray_to_v1_NamedTagEventListArray,
|
||||
Convert_v1_TagReferenceArray_to_api_TagReferenceMap,
|
||||
Convert_api_TagReferenceMap_to_v1_TagReferenceArray,
|
||||
|
||||
Convert_api_Image_To_v1_Image,
|
||||
Convert_v1_Image_To_api_Image,
|
||||
Convert_v1_ImageStreamSpec_To_api_ImageStreamSpec,
|
||||
Convert_api_ImageStreamSpec_To_v1_ImageStreamSpec,
|
||||
Convert_v1_ImageStreamStatus_To_api_ImageStreamStatus,
|
||||
Convert_api_ImageStreamStatus_To_v1_ImageStreamStatus,
|
||||
Convert_api_ImageStreamMapping_To_v1_ImageStreamMapping,
|
||||
Convert_v1_ImageStreamMapping_To_api_ImageStreamMapping,
|
||||
)
|
||||
if err != nil {
|
||||
// If one of the conversion functions is malformed, detect it immediately.
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if err := scheme.AddFieldLabelConversionFunc("v1", "Image",
|
||||
oapi.GetFieldLabelConversionFunc(newer.ImageToSelectableFields(&newer.Image{}), nil),
|
||||
); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
if err := scheme.AddFieldLabelConversionFunc("v1", "ImageStream",
|
||||
oapi.GetFieldLabelConversionFunc(newer.ImageStreamToSelectableFields(&newer.ImageStream{}), map[string]string{"name": "metadata.name"}),
|
||||
); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
1087
vendor/github.com/openshift/origin/pkg/image/api/v1/conversion_generated.go
generated
vendored
Normal file
1087
vendor/github.com/openshift/origin/pkg/image/api/v1/conversion_generated.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
622
vendor/github.com/openshift/origin/pkg/image/api/v1/deep_copy_generated.go
generated
vendored
Normal file
622
vendor/github.com/openshift/origin/pkg/image/api/v1/deep_copy_generated.go
generated
vendored
Normal file
@ -0,0 +1,622 @@
|
||||
// +build !ignore_autogenerated_openshift
|
||||
|
||||
// This file was autogenerated by deepcopy-gen. Do not edit it manually!
|
||||
|
||||
package v1
|
||||
|
||||
import (
|
||||
api "k8s.io/kubernetes/pkg/api"
|
||||
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
|
||||
api_v1 "k8s.io/kubernetes/pkg/api/v1"
|
||||
conversion "k8s.io/kubernetes/pkg/conversion"
|
||||
runtime "k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
func init() {
|
||||
if err := api.Scheme.AddGeneratedDeepCopyFuncs(
|
||||
DeepCopy_v1_DockerImageReference,
|
||||
DeepCopy_v1_Image,
|
||||
DeepCopy_v1_ImageImportSpec,
|
||||
DeepCopy_v1_ImageImportStatus,
|
||||
DeepCopy_v1_ImageLayer,
|
||||
DeepCopy_v1_ImageList,
|
||||
DeepCopy_v1_ImageSignature,
|
||||
DeepCopy_v1_ImageStream,
|
||||
DeepCopy_v1_ImageStreamImage,
|
||||
DeepCopy_v1_ImageStreamImport,
|
||||
DeepCopy_v1_ImageStreamImportSpec,
|
||||
DeepCopy_v1_ImageStreamImportStatus,
|
||||
DeepCopy_v1_ImageStreamList,
|
||||
DeepCopy_v1_ImageStreamMapping,
|
||||
DeepCopy_v1_ImageStreamSpec,
|
||||
DeepCopy_v1_ImageStreamStatus,
|
||||
DeepCopy_v1_ImageStreamTag,
|
||||
DeepCopy_v1_ImageStreamTagList,
|
||||
DeepCopy_v1_NamedTagEventList,
|
||||
DeepCopy_v1_RepositoryImportSpec,
|
||||
DeepCopy_v1_RepositoryImportStatus,
|
||||
DeepCopy_v1_SignatureCondition,
|
||||
DeepCopy_v1_SignatureGenericEntity,
|
||||
DeepCopy_v1_SignatureIssuer,
|
||||
DeepCopy_v1_SignatureSubject,
|
||||
DeepCopy_v1_TagEvent,
|
||||
DeepCopy_v1_TagEventCondition,
|
||||
DeepCopy_v1_TagImportPolicy,
|
||||
DeepCopy_v1_TagReference,
|
||||
); err != nil {
|
||||
// if one of the deep copy functions is malformed, detect it immediately.
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func DeepCopy_v1_DockerImageReference(in DockerImageReference, out *DockerImageReference, c *conversion.Cloner) error {
|
||||
out.Registry = in.Registry
|
||||
out.Namespace = in.Namespace
|
||||
out.Name = in.Name
|
||||
out.Tag = in.Tag
|
||||
out.ID = in.ID
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_Image(in Image, out *Image, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.DockerImageReference = in.DockerImageReference
|
||||
if err := runtime.DeepCopy_runtime_RawExtension(in.DockerImageMetadata, &out.DockerImageMetadata, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.DockerImageMetadataVersion = in.DockerImageMetadataVersion
|
||||
out.DockerImageManifest = in.DockerImageManifest
|
||||
if in.DockerImageLayers != nil {
|
||||
in, out := in.DockerImageLayers, &out.DockerImageLayers
|
||||
*out = make([]ImageLayer, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_ImageLayer(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.DockerImageLayers = nil
|
||||
}
|
||||
if in.Signatures != nil {
|
||||
in, out := in.Signatures, &out.Signatures
|
||||
*out = make([]ImageSignature, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_ImageSignature(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Signatures = nil
|
||||
}
|
||||
if in.DockerImageSignatures != nil {
|
||||
in, out := in.DockerImageSignatures, &out.DockerImageSignatures
|
||||
*out = make([][]byte, len(in))
|
||||
for i := range in {
|
||||
if newVal, err := c.DeepCopy(in[i]); err != nil {
|
||||
return err
|
||||
} else {
|
||||
(*out)[i] = newVal.([]byte)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.DockerImageSignatures = nil
|
||||
}
|
||||
out.DockerImageManifestMediaType = in.DockerImageManifestMediaType
|
||||
out.DockerImageConfig = in.DockerImageConfig
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageImportSpec(in ImageImportSpec, out *ImageImportSpec, c *conversion.Cloner) error {
|
||||
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.To != nil {
|
||||
in, out := in.To, &out.To
|
||||
*out = new(api_v1.LocalObjectReference)
|
||||
if err := api_v1.DeepCopy_v1_LocalObjectReference(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.To = nil
|
||||
}
|
||||
if err := DeepCopy_v1_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.IncludeManifest = in.IncludeManifest
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageImportStatus(in ImageImportStatus, out *ImageImportStatus, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_Status(in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Image != nil {
|
||||
in, out := in.Image, &out.Image
|
||||
*out = new(Image)
|
||||
if err := DeepCopy_v1_Image(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Image = nil
|
||||
}
|
||||
out.Tag = in.Tag
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageLayer(in ImageLayer, out *ImageLayer, c *conversion.Cloner) error {
|
||||
out.Name = in.Name
|
||||
out.LayerSize = in.LayerSize
|
||||
out.MediaType = in.MediaType
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageList(in ImageList, out *ImageList, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]Image, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_Image(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageSignature(in ImageSignature, out *ImageSignature, c *conversion.Cloner) error {
|
||||
out.Type = in.Type
|
||||
if in.Content != nil {
|
||||
in, out := in.Content, &out.Content
|
||||
*out = make([]byte, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.Content = nil
|
||||
}
|
||||
if in.Conditions != nil {
|
||||
in, out := in.Conditions, &out.Conditions
|
||||
*out = make([]SignatureCondition, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_SignatureCondition(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Conditions = nil
|
||||
}
|
||||
out.ImageIdentity = in.ImageIdentity
|
||||
if in.SignedClaims != nil {
|
||||
in, out := in.SignedClaims, &out.SignedClaims
|
||||
*out = make(map[string]string)
|
||||
for key, val := range in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
} else {
|
||||
out.SignedClaims = nil
|
||||
}
|
||||
if in.Created != nil {
|
||||
in, out := in.Created, &out.Created
|
||||
*out = new(unversioned.Time)
|
||||
if err := unversioned.DeepCopy_unversioned_Time(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Created = nil
|
||||
}
|
||||
if in.IssuedBy != nil {
|
||||
in, out := in.IssuedBy, &out.IssuedBy
|
||||
*out = new(SignatureIssuer)
|
||||
if err := DeepCopy_v1_SignatureIssuer(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.IssuedBy = nil
|
||||
}
|
||||
if in.IssuedTo != nil {
|
||||
in, out := in.IssuedTo, &out.IssuedTo
|
||||
*out = new(SignatureSubject)
|
||||
if err := DeepCopy_v1_SignatureSubject(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.IssuedTo = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStream(in ImageStream, out *ImageStream, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_ImageStreamSpec(in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_ImageStreamStatus(in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamImage(in ImageStreamImage, out *ImageStreamImage, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_Image(in.Image, &out.Image, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamImport(in ImageStreamImport, out *ImageStreamImport, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_ImageStreamImportSpec(in.Spec, &out.Spec, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_ImageStreamImportStatus(in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamImportSpec(in ImageStreamImportSpec, out *ImageStreamImportSpec, c *conversion.Cloner) error {
|
||||
out.Import = in.Import
|
||||
if in.Repository != nil {
|
||||
in, out := in.Repository, &out.Repository
|
||||
*out = new(RepositoryImportSpec)
|
||||
if err := DeepCopy_v1_RepositoryImportSpec(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Repository = nil
|
||||
}
|
||||
if in.Images != nil {
|
||||
in, out := in.Images, &out.Images
|
||||
*out = make([]ImageImportSpec, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_ImageImportSpec(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Images = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamImportStatus(in ImageStreamImportStatus, out *ImageStreamImportStatus, c *conversion.Cloner) error {
|
||||
if in.Import != nil {
|
||||
in, out := in.Import, &out.Import
|
||||
*out = new(ImageStream)
|
||||
if err := DeepCopy_v1_ImageStream(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Import = nil
|
||||
}
|
||||
if in.Repository != nil {
|
||||
in, out := in.Repository, &out.Repository
|
||||
*out = new(RepositoryImportStatus)
|
||||
if err := DeepCopy_v1_RepositoryImportStatus(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Repository = nil
|
||||
}
|
||||
if in.Images != nil {
|
||||
in, out := in.Images, &out.Images
|
||||
*out = make([]ImageImportStatus, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_ImageImportStatus(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Images = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamList(in ImageStreamList, out *ImageStreamList, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]ImageStream, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_ImageStream(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamMapping(in ImageStreamMapping, out *ImageStreamMapping, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_Image(in.Image, &out.Image, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Tag = in.Tag
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamSpec(in ImageStreamSpec, out *ImageStreamSpec, c *conversion.Cloner) error {
|
||||
out.DockerImageRepository = in.DockerImageRepository
|
||||
if in.Tags != nil {
|
||||
in, out := in.Tags, &out.Tags
|
||||
*out = make([]TagReference, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_TagReference(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Tags = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamStatus(in ImageStreamStatus, out *ImageStreamStatus, c *conversion.Cloner) error {
|
||||
out.DockerImageRepository = in.DockerImageRepository
|
||||
if in.Tags != nil {
|
||||
in, out := in.Tags, &out.Tags
|
||||
*out = make([]NamedTagEventList, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_NamedTagEventList(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Tags = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamTag(in ImageStreamTag, out *ImageStreamTag, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := api_v1.DeepCopy_v1_ObjectMeta(in.ObjectMeta, &out.ObjectMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Tag != nil {
|
||||
in, out := in.Tag, &out.Tag
|
||||
*out = new(TagReference)
|
||||
if err := DeepCopy_v1_TagReference(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Tag = nil
|
||||
}
|
||||
out.Generation = in.Generation
|
||||
if in.Conditions != nil {
|
||||
in, out := in.Conditions, &out.Conditions
|
||||
*out = make([]TagEventCondition, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_TagEventCondition(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Conditions = nil
|
||||
}
|
||||
if err := DeepCopy_v1_Image(in.Image, &out.Image, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_ImageStreamTagList(in ImageStreamTagList, out *ImageStreamTagList, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_TypeMeta(in.TypeMeta, &out.TypeMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_ListMeta(in.ListMeta, &out.ListMeta, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]ImageStreamTag, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_ImageStreamTag(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_NamedTagEventList(in NamedTagEventList, out *NamedTagEventList, c *conversion.Cloner) error {
|
||||
out.Tag = in.Tag
|
||||
if in.Items != nil {
|
||||
in, out := in.Items, &out.Items
|
||||
*out = make([]TagEvent, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_TagEvent(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Items = nil
|
||||
}
|
||||
if in.Conditions != nil {
|
||||
in, out := in.Conditions, &out.Conditions
|
||||
*out = make([]TagEventCondition, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_TagEventCondition(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Conditions = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_RepositoryImportSpec(in RepositoryImportSpec, out *RepositoryImportSpec, c *conversion.Cloner) error {
|
||||
if err := api_v1.DeepCopy_v1_ObjectReference(in.From, &out.From, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := DeepCopy_v1_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.IncludeManifest = in.IncludeManifest
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_RepositoryImportStatus(in RepositoryImportStatus, out *RepositoryImportStatus, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_Status(in.Status, &out.Status, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if in.Images != nil {
|
||||
in, out := in.Images, &out.Images
|
||||
*out = make([]ImageImportStatus, len(in))
|
||||
for i := range in {
|
||||
if err := DeepCopy_v1_ImageImportStatus(in[i], &(*out)[i], c); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
} else {
|
||||
out.Images = nil
|
||||
}
|
||||
if in.AdditionalTags != nil {
|
||||
in, out := in.AdditionalTags, &out.AdditionalTags
|
||||
*out = make([]string, len(in))
|
||||
copy(*out, in)
|
||||
} else {
|
||||
out.AdditionalTags = nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_SignatureCondition(in SignatureCondition, out *SignatureCondition, c *conversion.Cloner) error {
|
||||
out.Type = in.Type
|
||||
out.Status = in.Status
|
||||
if err := unversioned.DeepCopy_unversioned_Time(in.LastProbeTime, &out.LastProbeTime, c); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := unversioned.DeepCopy_unversioned_Time(in.LastTransitionTime, &out.LastTransitionTime, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Reason = in.Reason
|
||||
out.Message = in.Message
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_SignatureGenericEntity(in SignatureGenericEntity, out *SignatureGenericEntity, c *conversion.Cloner) error {
|
||||
out.Organization = in.Organization
|
||||
out.CommonName = in.CommonName
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_SignatureIssuer(in SignatureIssuer, out *SignatureIssuer, c *conversion.Cloner) error {
|
||||
if err := DeepCopy_v1_SignatureGenericEntity(in.SignatureGenericEntity, &out.SignatureGenericEntity, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_SignatureSubject(in SignatureSubject, out *SignatureSubject, c *conversion.Cloner) error {
|
||||
if err := DeepCopy_v1_SignatureGenericEntity(in.SignatureGenericEntity, &out.SignatureGenericEntity, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.PublicKeyID = in.PublicKeyID
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_TagEvent(in TagEvent, out *TagEvent, c *conversion.Cloner) error {
|
||||
if err := unversioned.DeepCopy_unversioned_Time(in.Created, &out.Created, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.DockerImageReference = in.DockerImageReference
|
||||
out.Image = in.Image
|
||||
out.Generation = in.Generation
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_TagEventCondition(in TagEventCondition, out *TagEventCondition, c *conversion.Cloner) error {
|
||||
out.Type = in.Type
|
||||
out.Status = in.Status
|
||||
if err := unversioned.DeepCopy_unversioned_Time(in.LastTransitionTime, &out.LastTransitionTime, c); err != nil {
|
||||
return err
|
||||
}
|
||||
out.Reason = in.Reason
|
||||
out.Message = in.Message
|
||||
out.Generation = in.Generation
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_TagImportPolicy(in TagImportPolicy, out *TagImportPolicy, c *conversion.Cloner) error {
|
||||
out.Insecure = in.Insecure
|
||||
out.Scheduled = in.Scheduled
|
||||
return nil
|
||||
}
|
||||
|
||||
func DeepCopy_v1_TagReference(in TagReference, out *TagReference, c *conversion.Cloner) error {
|
||||
out.Name = in.Name
|
||||
if in.Annotations != nil {
|
||||
in, out := in.Annotations, &out.Annotations
|
||||
*out = make(map[string]string)
|
||||
for key, val := range in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
} else {
|
||||
out.Annotations = nil
|
||||
}
|
||||
if in.From != nil {
|
||||
in, out := in.From, &out.From
|
||||
*out = new(api_v1.ObjectReference)
|
||||
if err := api_v1.DeepCopy_v1_ObjectReference(*in, *out, c); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.From = nil
|
||||
}
|
||||
out.Reference = in.Reference
|
||||
if in.Generation != nil {
|
||||
in, out := in.Generation, &out.Generation
|
||||
*out = new(int64)
|
||||
**out = *in
|
||||
} else {
|
||||
out.Generation = nil
|
||||
}
|
||||
if err := DeepCopy_v1_TagImportPolicy(in.ImportPolicy, &out.ImportPolicy, c); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
26
vendor/github.com/openshift/origin/pkg/image/api/v1/defaults.go
generated
vendored
Normal file
26
vendor/github.com/openshift/origin/pkg/image/api/v1/defaults.go
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
newer "github.com/openshift/origin/pkg/image/api"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
func SetDefaults_ImageImportSpec(obj *ImageImportSpec) {
|
||||
if obj.To == nil {
|
||||
if ref, err := newer.ParseDockerImageReference(obj.From.Name); err == nil {
|
||||
if len(ref.Tag) > 0 {
|
||||
obj.To = &v1.LocalObjectReference{Name: ref.Tag}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func addDefaultingFuncs(scheme *runtime.Scheme) {
|
||||
err := scheme.AddDefaultingFuncs(
|
||||
SetDefaults_ImageImportSpec,
|
||||
)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
3
vendor/github.com/openshift/origin/pkg/image/api/v1/doc.go
generated
vendored
Normal file
3
vendor/github.com/openshift/origin/pkg/image/api/v1/doc.go
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
// Package v1 is the v1 version of the API.
|
||||
// +genconversion=true
|
||||
package v1
|
||||
6705
vendor/github.com/openshift/origin/pkg/image/api/v1/generated.pb.go
generated
vendored
Normal file
6705
vendor/github.com/openshift/origin/pkg/image/api/v1/generated.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
434
vendor/github.com/openshift/origin/pkg/image/api/v1/generated.proto
generated
vendored
Normal file
434
vendor/github.com/openshift/origin/pkg/image/api/v1/generated.proto
generated
vendored
Normal file
@ -0,0 +1,434 @@
|
||||
|
||||
// This file was autogenerated by go-to-protobuf. Do not edit it manually!
|
||||
|
||||
syntax = 'proto2';
|
||||
|
||||
package github.com.openshift.origin.pkg.image.api.v1;
|
||||
|
||||
import "k8s.io/kubernetes/pkg/api/resource/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/api/unversioned/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/api/v1/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/runtime/generated.proto";
|
||||
import "k8s.io/kubernetes/pkg/util/intstr/generated.proto";
|
||||
|
||||
// Package-wide variables from generator "generated".
|
||||
option go_package = "v1";
|
||||
|
||||
// DockerImageReference points to a Docker image.
|
||||
message DockerImageReference {
|
||||
// Registry is the registry that contains the Docker image
|
||||
optional string registry = 1;
|
||||
|
||||
// Namespace is the namespace that contains the Docker image
|
||||
optional string namespace = 2;
|
||||
|
||||
// Name is the name of the Docker image
|
||||
optional string name = 3;
|
||||
|
||||
// Tag is which tag of the Docker image is being referenced
|
||||
optional string tag = 4;
|
||||
|
||||
// ID is the identifier for the Docker image
|
||||
optional string iD = 5;
|
||||
}
|
||||
|
||||
// Image is an immutable representation of a Docker image and metadata at a point in time.
|
||||
message Image {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// DockerImageReference is the string that can be used to pull this image.
|
||||
optional string dockerImageReference = 2;
|
||||
|
||||
// DockerImageMetadata contains metadata about this image
|
||||
optional k8s.io.kubernetes.pkg.runtime.RawExtension dockerImageMetadata = 3;
|
||||
|
||||
// DockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0"
|
||||
optional string dockerImageMetadataVersion = 4;
|
||||
|
||||
// DockerImageManifest is the raw JSON of the manifest
|
||||
optional string dockerImageManifest = 5;
|
||||
|
||||
// DockerImageLayers represents the layers in the image. May not be set if the image does not define that data.
|
||||
repeated ImageLayer dockerImageLayers = 6;
|
||||
|
||||
// Signatures holds all signatures of the image.
|
||||
repeated ImageSignature signatures = 7;
|
||||
|
||||
// DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.
|
||||
repeated bytes dockerImageSignatures = 8;
|
||||
|
||||
// DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2.
|
||||
optional string dockerImageManifestMediaType = 9;
|
||||
|
||||
// DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2.
|
||||
optional string dockerImageConfig = 10;
|
||||
}
|
||||
|
||||
// ImageImportSpec describes a request to import a specific image.
|
||||
message ImageImportSpec {
|
||||
// From is the source of an image to import; only kind DockerImage is allowed
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 1;
|
||||
|
||||
// To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used
|
||||
optional k8s.io.kubernetes.pkg.api.v1.LocalObjectReference to = 2;
|
||||
|
||||
// ImportPolicy is the policy controlling how the image is imported
|
||||
optional TagImportPolicy importPolicy = 3;
|
||||
|
||||
// IncludeManifest determines if the manifest for each image is returned in the response
|
||||
optional bool includeManifest = 4;
|
||||
}
|
||||
|
||||
// ImageImportStatus describes the result of an image import.
|
||||
message ImageImportStatus {
|
||||
// Status is the status of the image import, including errors encountered while retrieving the image
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.Status status = 1;
|
||||
|
||||
// Image is the metadata of that image, if the image was located
|
||||
optional Image image = 2;
|
||||
|
||||
// Tag is the tag this image was located under, if any
|
||||
optional string tag = 3;
|
||||
}
|
||||
|
||||
// ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none.
|
||||
message ImageLayer {
|
||||
// Name of the layer as defined by the underlying store.
|
||||
optional string name = 1;
|
||||
|
||||
// Size of the layer in bytes as defined by the underlying store.
|
||||
optional int64 size = 2;
|
||||
|
||||
// MediaType of the referenced object.
|
||||
optional string mediaType = 3;
|
||||
}
|
||||
|
||||
// ImageList is a list of Image objects.
|
||||
message ImageList {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
|
||||
|
||||
// Items is a list of images
|
||||
repeated Image items = 2;
|
||||
}
|
||||
|
||||
// ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims
|
||||
// as long as the signature is trusted. Based on this information it is possible to restrict runnable images
|
||||
// to those matching cluster-wide policy.
|
||||
// There are two mandatory fields provided by client: Type and Content. They should be parsed by clients doing
|
||||
// image verification. The others are parsed from signature's content by the server. They serve just an
|
||||
// informative purpose.
|
||||
message ImageSignature {
|
||||
// Required: Describes a type of stored blob.
|
||||
optional string type = 1;
|
||||
|
||||
// Required: An opaque binary string which is an image's signature.
|
||||
optional bytes content = 2;
|
||||
|
||||
// Conditions represent the latest available observations of a signature's current state.
|
||||
repeated SignatureCondition conditions = 3;
|
||||
|
||||
// A human readable string representing image's identity. It could be a product name and version, or an
|
||||
// image pull spec (e.g. "registry.access.redhat.com/rhel7/rhel:7.2").
|
||||
optional string imageIdentity = 4;
|
||||
|
||||
// Contains claims from the signature.
|
||||
map<string, string> signedClaims = 5;
|
||||
|
||||
// If specified, it is the time of signature's creation.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.Time created = 6;
|
||||
|
||||
// If specified, it holds information about an issuer of signing certificate or key (a person or entity
|
||||
// who signed the signing certificate or key).
|
||||
optional SignatureIssuer issuedBy = 7;
|
||||
|
||||
// If specified, it holds information about a subject of signing certificate or key (a person or entity
|
||||
// who signed the image).
|
||||
optional SignatureSubject issuedTo = 8;
|
||||
}
|
||||
|
||||
// ImageStream stores a mapping of tags to images, metadata overrides that are applied
|
||||
// when images are tagged in a stream, and an optional reference to a Docker image
|
||||
// repository on a registry.
|
||||
message ImageStream {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec describes the desired state of this stream
|
||||
optional ImageStreamSpec spec = 2;
|
||||
|
||||
// Status describes the current state of this stream
|
||||
optional ImageStreamStatus status = 3;
|
||||
}
|
||||
|
||||
// ImageStreamImage represents an Image that is retrieved by image name from an ImageStream.
|
||||
message ImageStreamImage {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Image associated with the ImageStream and image name.
|
||||
optional Image image = 2;
|
||||
}
|
||||
|
||||
// ImageStreamImport imports an image from remote repositories into OpenShift.
|
||||
message ImageStreamImport {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Spec is a description of the images that the user wishes to import
|
||||
optional ImageStreamImportSpec spec = 2;
|
||||
|
||||
// Status is the the result of importing the image
|
||||
optional ImageStreamImportStatus status = 3;
|
||||
}
|
||||
|
||||
// ImageStreamImportSpec defines what images should be imported.
|
||||
message ImageStreamImportSpec {
|
||||
// Import indicates whether to perform an import - if so, the specified tags are set on the spec
|
||||
// and status of the image stream defined by the type meta.
|
||||
optional bool import = 1;
|
||||
|
||||
// Repository is an optional import of an entire Docker image repository. A maximum limit on the
|
||||
// number of tags imported this way is imposed by the server.
|
||||
optional RepositoryImportSpec repository = 2;
|
||||
|
||||
// Images are a list of individual images to import.
|
||||
repeated ImageImportSpec images = 3;
|
||||
}
|
||||
|
||||
// ImageStreamImportStatus contains information about the status of an image stream import.
|
||||
message ImageStreamImportStatus {
|
||||
// Import is the image stream that was successfully updated or created when 'to' was set.
|
||||
optional ImageStream import = 1;
|
||||
|
||||
// Repository is set if spec.repository was set to the outcome of the import
|
||||
optional RepositoryImportStatus repository = 2;
|
||||
|
||||
// Images is set with the result of importing spec.images
|
||||
repeated ImageImportStatus images = 3;
|
||||
}
|
||||
|
||||
// ImageStreamList is a list of ImageStream objects.
|
||||
message ImageStreamList {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
|
||||
|
||||
// Items is a list of imageStreams
|
||||
repeated ImageStream items = 2;
|
||||
}
|
||||
|
||||
// ImageStreamMapping represents a mapping from a single tag to a Docker image as
|
||||
// well as the reference to the Docker image stream the image came from.
|
||||
message ImageStreamMapping {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Image is a Docker image.
|
||||
optional Image image = 2;
|
||||
|
||||
// Tag is a string value this image can be located with inside the stream.
|
||||
optional string tag = 3;
|
||||
}
|
||||
|
||||
// ImageStreamSpec represents options for ImageStreams.
|
||||
message ImageStreamSpec {
|
||||
// DockerImageRepository is optional, if specified this stream is backed by a Docker repository on this server
|
||||
optional string dockerImageRepository = 1;
|
||||
|
||||
// Tags map arbitrary string values to specific image locators
|
||||
repeated TagReference tags = 2;
|
||||
}
|
||||
|
||||
// ImageStreamStatus contains information about the state of this image stream.
|
||||
message ImageStreamStatus {
|
||||
// DockerImageRepository represents the effective location this stream may be accessed at.
|
||||
// May be empty until the server determines where the repository is located
|
||||
optional string dockerImageRepository = 1;
|
||||
|
||||
// Tags are a historical record of images associated with each tag. The first entry in the
|
||||
// TagEvent array is the currently tagged image.
|
||||
repeated NamedTagEventList tags = 2;
|
||||
}
|
||||
|
||||
// ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream.
|
||||
message ImageStreamTag {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectMeta metadata = 1;
|
||||
|
||||
// Tag is the spec tag associated with this image stream tag, and it may be null
|
||||
// if only pushes have occurred to this image stream.
|
||||
optional TagReference tag = 2;
|
||||
|
||||
// Generation is the current generation of the tagged image - if tag is provided
|
||||
// and this value is not equal to the tag generation, a user has requested an
|
||||
// import that has not completed, or Conditions will be filled out indicating any
|
||||
// error.
|
||||
optional int64 generation = 3;
|
||||
|
||||
// Conditions is an array of conditions that apply to the image stream tag.
|
||||
repeated TagEventCondition conditions = 4;
|
||||
|
||||
// Image associated with the ImageStream and tag.
|
||||
optional Image image = 5;
|
||||
}
|
||||
|
||||
// ImageStreamTagList is a list of ImageStreamTag objects.
|
||||
message ImageStreamTagList {
|
||||
// Standard object's metadata.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.ListMeta metadata = 1;
|
||||
|
||||
// Items is the list of image stream tags
|
||||
repeated ImageStreamTag items = 2;
|
||||
}
|
||||
|
||||
// NamedTagEventList relates a tag to its image history.
|
||||
message NamedTagEventList {
|
||||
// Tag is the tag for which the history is recorded
|
||||
optional string tag = 1;
|
||||
|
||||
// Standard object's metadata.
|
||||
repeated TagEvent items = 2;
|
||||
|
||||
// Conditions is an array of conditions that apply to the tag event list.
|
||||
repeated TagEventCondition conditions = 3;
|
||||
}
|
||||
|
||||
// RepositoryImportSpec describes a request to import images from a Docker image repository.
|
||||
message RepositoryImportSpec {
|
||||
// From is the source for the image repository to import; only kind DockerImage and a name of a Docker image repository is allowed
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 1;
|
||||
|
||||
// ImportPolicy is the policy controlling how the image is imported
|
||||
optional TagImportPolicy importPolicy = 2;
|
||||
|
||||
// IncludeManifest determines if the manifest for each image is returned in the response
|
||||
optional bool includeManifest = 3;
|
||||
}
|
||||
|
||||
// RepositoryImportStatus describes the result of an image repository import
|
||||
message RepositoryImportStatus {
|
||||
// Status reflects whether any failure occurred during import
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.Status status = 1;
|
||||
|
||||
// Images is a list of images successfully retrieved by the import of the repository.
|
||||
repeated ImageImportStatus images = 2;
|
||||
|
||||
// AdditionalTags are tags that exist in the repository but were not imported because
|
||||
// a maximum limit of automatic imports was applied.
|
||||
repeated string additionalTags = 3;
|
||||
}
|
||||
|
||||
// SignatureCondition describes an image signature condition of particular kind at particular probe time.
|
||||
message SignatureCondition {
|
||||
// Type of job condition, Complete or Failed.
|
||||
optional string type = 1;
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
optional string status = 2;
|
||||
|
||||
// Last time the condition was checked.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastProbeTime = 3;
|
||||
|
||||
// Last time the condition transit from one status to another.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 4;
|
||||
|
||||
// (brief) reason for the condition's last transition.
|
||||
optional string reason = 5;
|
||||
|
||||
// Human readable message indicating details about last transition.
|
||||
optional string message = 6;
|
||||
}
|
||||
|
||||
// SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject
|
||||
// of signing certificate or key.
|
||||
message SignatureGenericEntity {
|
||||
// Organization name.
|
||||
optional string organization = 1;
|
||||
|
||||
// Common name (e.g. openshift-signing-service).
|
||||
optional string commonName = 2;
|
||||
}
|
||||
|
||||
// SignatureIssuer holds information about an issuer of signing certificate or key.
|
||||
message SignatureIssuer {
|
||||
optional SignatureGenericEntity signatureGenericEntity = 1;
|
||||
}
|
||||
|
||||
// SignatureSubject holds information about a person or entity who created the signature.
|
||||
message SignatureSubject {
|
||||
optional SignatureGenericEntity signatureGenericEntity = 1;
|
||||
|
||||
// If present, it is a human readable key id of public key belonging to the subject used to verify image
|
||||
// signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g.
|
||||
// 0x685ebe62bf278440).
|
||||
optional string publicKeyID = 2;
|
||||
}
|
||||
|
||||
// TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag.
|
||||
message TagEvent {
|
||||
// Created holds the time the TagEvent was created
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.Time created = 1;
|
||||
|
||||
// DockerImageReference is the string that can be used to pull this image
|
||||
optional string dockerImageReference = 2;
|
||||
|
||||
// Image is the image
|
||||
optional string image = 3;
|
||||
|
||||
// Generation is the spec tag generation that resulted in this tag being updated
|
||||
optional int64 generation = 4;
|
||||
}
|
||||
|
||||
// TagEventCondition contains condition information for a tag event.
|
||||
message TagEventCondition {
|
||||
// Type of tag event condition, currently only ImportSuccess
|
||||
optional string type = 1;
|
||||
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
optional string status = 2;
|
||||
|
||||
// LastTransitionTIme is the time the condition transitioned from one status to another.
|
||||
optional k8s.io.kubernetes.pkg.api.unversioned.Time lastTransitionTime = 3;
|
||||
|
||||
// Reason is a brief machine readable explanation for the condition's last transition.
|
||||
optional string reason = 4;
|
||||
|
||||
// Message is a human readable description of the details about last transition, complementing reason.
|
||||
optional string message = 5;
|
||||
|
||||
// Generation is the spec tag generation that this status corresponds to
|
||||
optional int64 generation = 6;
|
||||
}
|
||||
|
||||
// TagImportPolicy describes the tag import policy
|
||||
message TagImportPolicy {
|
||||
// Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import.
|
||||
optional bool insecure = 1;
|
||||
|
||||
// Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported
|
||||
optional bool scheduled = 2;
|
||||
}
|
||||
|
||||
// TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track.
|
||||
message TagReference {
|
||||
// Name of the tag
|
||||
optional string name = 1;
|
||||
|
||||
// Annotations associated with images using this tag
|
||||
map<string, string> annotations = 2;
|
||||
|
||||
// From is a reference to an image stream tag or image stream this tag should track
|
||||
optional k8s.io.kubernetes.pkg.api.v1.ObjectReference from = 3;
|
||||
|
||||
// Reference states if the tag will be imported. Default value is false, which means the tag will be imported.
|
||||
optional bool reference = 4;
|
||||
|
||||
// Generation is the image stream generation that updated this tag - setting it to 0 is an indication that the generation must be updated.
|
||||
// Legacy clients will send this as nil, which means the client doesn't know or care.
|
||||
optional int64 generation = 5;
|
||||
|
||||
// Import is information that controls how images may be imported by the server.
|
||||
optional TagImportPolicy importPolicy = 6;
|
||||
}
|
||||
|
||||
47
vendor/github.com/openshift/origin/pkg/image/api/v1/register.go
generated
vendored
Normal file
47
vendor/github.com/openshift/origin/pkg/image/api/v1/register.go
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
|
||||
"github.com/openshift/origin/pkg/image/api/docker10"
|
||||
"github.com/openshift/origin/pkg/image/api/dockerpre012"
|
||||
)
|
||||
|
||||
const GroupName = ""
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = unversioned.GroupVersion{Group: GroupName, Version: "v1"}
|
||||
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
docker10.AddToScheme(scheme)
|
||||
dockerpre012.AddToScheme(scheme)
|
||||
addKnownTypes(scheme)
|
||||
addDefaultingFuncs(scheme)
|
||||
addConversionFuncs(scheme)
|
||||
}
|
||||
|
||||
// Adds the list of known types to api.Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&Image{},
|
||||
&ImageList{},
|
||||
&ImageStream{},
|
||||
&ImageStreamList{},
|
||||
&ImageStreamMapping{},
|
||||
&ImageStreamTag{},
|
||||
&ImageStreamTagList{},
|
||||
&ImageStreamImage{},
|
||||
&ImageStreamImport{},
|
||||
)
|
||||
}
|
||||
|
||||
func (obj *Image) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ImageList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ImageStream) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ImageStreamList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ImageStreamMapping) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ImageStreamTag) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ImageStreamTagList) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ImageStreamImage) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
func (obj *ImageStreamImport) GetObjectKind() unversioned.ObjectKind { return &obj.TypeMeta }
|
||||
339
vendor/github.com/openshift/origin/pkg/image/api/v1/swagger_doc.go
generated
vendored
Normal file
339
vendor/github.com/openshift/origin/pkg/image/api/v1/swagger_doc.go
generated
vendored
Normal file
@ -0,0 +1,339 @@
|
||||
package v1
|
||||
|
||||
// This file contains methods that can be used by the go-restful package to generate Swagger
|
||||
// documentation for the object types found in 'types.go' This file is automatically generated
|
||||
// by hack/update-generated-swagger-descriptions.sh and should be run after a full build of OpenShift.
|
||||
// ==== DO NOT EDIT THIS FILE MANUALLY ====
|
||||
|
||||
var map_DockerImageReference = map[string]string{
|
||||
"": "DockerImageReference points to a Docker image.",
|
||||
"Registry": "Registry is the registry that contains the Docker image",
|
||||
"Namespace": "Namespace is the namespace that contains the Docker image",
|
||||
"Name": "Name is the name of the Docker image",
|
||||
"Tag": "Tag is which tag of the Docker image is being referenced",
|
||||
"ID": "ID is the identifier for the Docker image",
|
||||
}
|
||||
|
||||
func (DockerImageReference) SwaggerDoc() map[string]string {
|
||||
return map_DockerImageReference
|
||||
}
|
||||
|
||||
var map_Image = map[string]string{
|
||||
"": "Image is an immutable representation of a Docker image and metadata at a point in time.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"dockerImageReference": "DockerImageReference is the string that can be used to pull this image.",
|
||||
"dockerImageMetadata": "DockerImageMetadata contains metadata about this image",
|
||||
"dockerImageMetadataVersion": "DockerImageMetadataVersion conveys the version of the object, which if empty defaults to \"1.0\"",
|
||||
"dockerImageManifest": "DockerImageManifest is the raw JSON of the manifest",
|
||||
"dockerImageLayers": "DockerImageLayers represents the layers in the image. May not be set if the image does not define that data.",
|
||||
"signatures": "Signatures holds all signatures of the image.",
|
||||
"dockerImageSignatures": "DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.",
|
||||
"dockerImageManifestMediaType": "DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2.",
|
||||
"dockerImageConfig": "DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2.",
|
||||
}
|
||||
|
||||
func (Image) SwaggerDoc() map[string]string {
|
||||
return map_Image
|
||||
}
|
||||
|
||||
var map_ImageImportSpec = map[string]string{
|
||||
"": "ImageImportSpec describes a request to import a specific image.",
|
||||
"from": "From is the source of an image to import; only kind DockerImage is allowed",
|
||||
"to": "To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used",
|
||||
"importPolicy": "ImportPolicy is the policy controlling how the image is imported",
|
||||
"includeManifest": "IncludeManifest determines if the manifest for each image is returned in the response",
|
||||
}
|
||||
|
||||
func (ImageImportSpec) SwaggerDoc() map[string]string {
|
||||
return map_ImageImportSpec
|
||||
}
|
||||
|
||||
var map_ImageImportStatus = map[string]string{
|
||||
"": "ImageImportStatus describes the result of an image import.",
|
||||
"status": "Status is the status of the image import, including errors encountered while retrieving the image",
|
||||
"image": "Image is the metadata of that image, if the image was located",
|
||||
"tag": "Tag is the tag this image was located under, if any",
|
||||
}
|
||||
|
||||
func (ImageImportStatus) SwaggerDoc() map[string]string {
|
||||
return map_ImageImportStatus
|
||||
}
|
||||
|
||||
var map_ImageLayer = map[string]string{
|
||||
"": "ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none.",
|
||||
"name": "Name of the layer as defined by the underlying store.",
|
||||
"size": "Size of the layer in bytes as defined by the underlying store.",
|
||||
"mediaType": "MediaType of the referenced object.",
|
||||
}
|
||||
|
||||
func (ImageLayer) SwaggerDoc() map[string]string {
|
||||
return map_ImageLayer
|
||||
}
|
||||
|
||||
var map_ImageList = map[string]string{
|
||||
"": "ImageList is a list of Image objects.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"items": "Items is a list of images",
|
||||
}
|
||||
|
||||
func (ImageList) SwaggerDoc() map[string]string {
|
||||
return map_ImageList
|
||||
}
|
||||
|
||||
var map_ImageSignature = map[string]string{
|
||||
"": "ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims as long as the signature is trusted. Based on this information it is possible to restrict runnable images to those matching cluster-wide policy. There are two mandatory fields provided by client: Type and Content. They should be parsed by clients doing image verification. The others are parsed from signature's content by the server. They serve just an informative purpose.",
|
||||
"type": "Required: Describes a type of stored blob.",
|
||||
"content": "Required: An opaque binary string which is an image's signature.",
|
||||
"conditions": "Conditions represent the latest available observations of a signature's current state.",
|
||||
"imageIdentity": "A human readable string representing image's identity. It could be a product name and version, or an image pull spec (e.g. \"registry.access.redhat.com/rhel7/rhel:7.2\").",
|
||||
"signedClaims": "Contains claims from the signature.",
|
||||
"created": "If specified, it is the time of signature's creation.",
|
||||
"issuedBy": "If specified, it holds information about an issuer of signing certificate or key (a person or entity who signed the signing certificate or key).",
|
||||
"issuedTo": "If specified, it holds information about a subject of signing certificate or key (a person or entity who signed the image).",
|
||||
}
|
||||
|
||||
func (ImageSignature) SwaggerDoc() map[string]string {
|
||||
return map_ImageSignature
|
||||
}
|
||||
|
||||
var map_ImageStream = map[string]string{
|
||||
"": "ImageStream stores a mapping of tags to images, metadata overrides that are applied when images are tagged in a stream, and an optional reference to a Docker image repository on a registry.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"spec": "Spec describes the desired state of this stream",
|
||||
"status": "Status describes the current state of this stream",
|
||||
}
|
||||
|
||||
func (ImageStream) SwaggerDoc() map[string]string {
|
||||
return map_ImageStream
|
||||
}
|
||||
|
||||
var map_ImageStreamImage = map[string]string{
|
||||
"": "ImageStreamImage represents an Image that is retrieved by image name from an ImageStream.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"image": "Image associated with the ImageStream and image name.",
|
||||
}
|
||||
|
||||
func (ImageStreamImage) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamImage
|
||||
}
|
||||
|
||||
var map_ImageStreamImport = map[string]string{
|
||||
"": "ImageStreamImport imports an image from remote repositories into OpenShift.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"spec": "Spec is a description of the images that the user wishes to import",
|
||||
"status": "Status is the the result of importing the image",
|
||||
}
|
||||
|
||||
func (ImageStreamImport) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamImport
|
||||
}
|
||||
|
||||
var map_ImageStreamImportSpec = map[string]string{
|
||||
"": "ImageStreamImportSpec defines what images should be imported.",
|
||||
"import": "Import indicates whether to perform an import - if so, the specified tags are set on the spec and status of the image stream defined by the type meta.",
|
||||
"repository": "Repository is an optional import of an entire Docker image repository. A maximum limit on the number of tags imported this way is imposed by the server.",
|
||||
"images": "Images are a list of individual images to import.",
|
||||
}
|
||||
|
||||
func (ImageStreamImportSpec) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamImportSpec
|
||||
}
|
||||
|
||||
var map_ImageStreamImportStatus = map[string]string{
|
||||
"": "ImageStreamImportStatus contains information about the status of an image stream import.",
|
||||
"import": "Import is the image stream that was successfully updated or created when 'to' was set.",
|
||||
"repository": "Repository is set if spec.repository was set to the outcome of the import",
|
||||
"images": "Images is set with the result of importing spec.images",
|
||||
}
|
||||
|
||||
func (ImageStreamImportStatus) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamImportStatus
|
||||
}
|
||||
|
||||
var map_ImageStreamList = map[string]string{
|
||||
"": "ImageStreamList is a list of ImageStream objects.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"items": "Items is a list of imageStreams",
|
||||
}
|
||||
|
||||
func (ImageStreamList) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamList
|
||||
}
|
||||
|
||||
var map_ImageStreamMapping = map[string]string{
|
||||
"": "ImageStreamMapping represents a mapping from a single tag to a Docker image as well as the reference to the Docker image stream the image came from.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"image": "Image is a Docker image.",
|
||||
"tag": "Tag is a string value this image can be located with inside the stream.",
|
||||
}
|
||||
|
||||
func (ImageStreamMapping) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamMapping
|
||||
}
|
||||
|
||||
var map_ImageStreamSpec = map[string]string{
|
||||
"": "ImageStreamSpec represents options for ImageStreams.",
|
||||
"dockerImageRepository": "DockerImageRepository is optional, if specified this stream is backed by a Docker repository on this server",
|
||||
"tags": "Tags map arbitrary string values to specific image locators",
|
||||
}
|
||||
|
||||
func (ImageStreamSpec) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamSpec
|
||||
}
|
||||
|
||||
var map_ImageStreamStatus = map[string]string{
|
||||
"": "ImageStreamStatus contains information about the state of this image stream.",
|
||||
"dockerImageRepository": "DockerImageRepository represents the effective location this stream may be accessed at. May be empty until the server determines where the repository is located",
|
||||
"tags": "Tags are a historical record of images associated with each tag. The first entry in the TagEvent array is the currently tagged image.",
|
||||
}
|
||||
|
||||
func (ImageStreamStatus) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamStatus
|
||||
}
|
||||
|
||||
var map_ImageStreamTag = map[string]string{
|
||||
"": "ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"tag": "Tag is the spec tag associated with this image stream tag, and it may be null if only pushes have occurred to this image stream.",
|
||||
"generation": "Generation is the current generation of the tagged image - if tag is provided and this value is not equal to the tag generation, a user has requested an import that has not completed, or Conditions will be filled out indicating any error.",
|
||||
"conditions": "Conditions is an array of conditions that apply to the image stream tag.",
|
||||
"image": "Image associated with the ImageStream and tag.",
|
||||
}
|
||||
|
||||
func (ImageStreamTag) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamTag
|
||||
}
|
||||
|
||||
var map_ImageStreamTagList = map[string]string{
|
||||
"": "ImageStreamTagList is a list of ImageStreamTag objects.",
|
||||
"metadata": "Standard object's metadata.",
|
||||
"items": "Items is the list of image stream tags",
|
||||
}
|
||||
|
||||
func (ImageStreamTagList) SwaggerDoc() map[string]string {
|
||||
return map_ImageStreamTagList
|
||||
}
|
||||
|
||||
var map_NamedTagEventList = map[string]string{
|
||||
"": "NamedTagEventList relates a tag to its image history.",
|
||||
"tag": "Tag is the tag for which the history is recorded",
|
||||
"items": "Standard object's metadata.",
|
||||
"conditions": "Conditions is an array of conditions that apply to the tag event list.",
|
||||
}
|
||||
|
||||
func (NamedTagEventList) SwaggerDoc() map[string]string {
|
||||
return map_NamedTagEventList
|
||||
}
|
||||
|
||||
var map_RepositoryImportSpec = map[string]string{
|
||||
"": "RepositoryImportSpec describes a request to import images from a Docker image repository.",
|
||||
"from": "From is the source for the image repository to import; only kind DockerImage and a name of a Docker image repository is allowed",
|
||||
"importPolicy": "ImportPolicy is the policy controlling how the image is imported",
|
||||
"includeManifest": "IncludeManifest determines if the manifest for each image is returned in the response",
|
||||
}
|
||||
|
||||
func (RepositoryImportSpec) SwaggerDoc() map[string]string {
|
||||
return map_RepositoryImportSpec
|
||||
}
|
||||
|
||||
var map_RepositoryImportStatus = map[string]string{
|
||||
"": "RepositoryImportStatus describes the result of an image repository import",
|
||||
"status": "Status reflects whether any failure occurred during import",
|
||||
"images": "Images is a list of images successfully retrieved by the import of the repository.",
|
||||
"additionalTags": "AdditionalTags are tags that exist in the repository but were not imported because a maximum limit of automatic imports was applied.",
|
||||
}
|
||||
|
||||
func (RepositoryImportStatus) SwaggerDoc() map[string]string {
|
||||
return map_RepositoryImportStatus
|
||||
}
|
||||
|
||||
var map_SignatureCondition = map[string]string{
|
||||
"": "SignatureCondition describes an image signature condition of particular kind at particular probe time.",
|
||||
"type": "Type of job condition, Complete or Failed.",
|
||||
"status": "Status of the condition, one of True, False, Unknown.",
|
||||
"lastProbeTime": "Last time the condition was checked.",
|
||||
"lastTransitionTime": "Last time the condition transit from one status to another.",
|
||||
"reason": "(brief) reason for the condition's last transition.",
|
||||
"message": "Human readable message indicating details about last transition.",
|
||||
}
|
||||
|
||||
func (SignatureCondition) SwaggerDoc() map[string]string {
|
||||
return map_SignatureCondition
|
||||
}
|
||||
|
||||
var map_SignatureGenericEntity = map[string]string{
|
||||
"": "SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject of signing certificate or key.",
|
||||
"organization": "Organization name.",
|
||||
"commonName": "Common name (e.g. openshift-signing-service).",
|
||||
}
|
||||
|
||||
func (SignatureGenericEntity) SwaggerDoc() map[string]string {
|
||||
return map_SignatureGenericEntity
|
||||
}
|
||||
|
||||
var map_SignatureIssuer = map[string]string{
|
||||
"": "SignatureIssuer holds information about an issuer of signing certificate or key.",
|
||||
}
|
||||
|
||||
func (SignatureIssuer) SwaggerDoc() map[string]string {
|
||||
return map_SignatureIssuer
|
||||
}
|
||||
|
||||
var map_SignatureSubject = map[string]string{
|
||||
"": "SignatureSubject holds information about a person or entity who created the signature.",
|
||||
"publicKeyID": "If present, it is a human readable key id of public key belonging to the subject used to verify image signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g. 0x685ebe62bf278440).",
|
||||
}
|
||||
|
||||
func (SignatureSubject) SwaggerDoc() map[string]string {
|
||||
return map_SignatureSubject
|
||||
}
|
||||
|
||||
var map_TagEvent = map[string]string{
|
||||
"": "TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag.",
|
||||
"created": "Created holds the time the TagEvent was created",
|
||||
"dockerImageReference": "DockerImageReference is the string that can be used to pull this image",
|
||||
"image": "Image is the image",
|
||||
"generation": "Generation is the spec tag generation that resulted in this tag being updated",
|
||||
}
|
||||
|
||||
func (TagEvent) SwaggerDoc() map[string]string {
|
||||
return map_TagEvent
|
||||
}
|
||||
|
||||
var map_TagEventCondition = map[string]string{
|
||||
"": "TagEventCondition contains condition information for a tag event.",
|
||||
"type": "Type of tag event condition, currently only ImportSuccess",
|
||||
"status": "Status of the condition, one of True, False, Unknown.",
|
||||
"lastTransitionTime": "LastTransitionTIme is the time the condition transitioned from one status to another.",
|
||||
"reason": "Reason is a brief machine readable explanation for the condition's last transition.",
|
||||
"message": "Message is a human readable description of the details about last transition, complementing reason.",
|
||||
"generation": "Generation is the spec tag generation that this status corresponds to",
|
||||
}
|
||||
|
||||
func (TagEventCondition) SwaggerDoc() map[string]string {
|
||||
return map_TagEventCondition
|
||||
}
|
||||
|
||||
var map_TagImportPolicy = map[string]string{
|
||||
"": "TagImportPolicy describes the tag import policy",
|
||||
"insecure": "Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import.",
|
||||
"scheduled": "Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported",
|
||||
}
|
||||
|
||||
func (TagImportPolicy) SwaggerDoc() map[string]string {
|
||||
return map_TagImportPolicy
|
||||
}
|
||||
|
||||
var map_TagReference = map[string]string{
|
||||
"": "TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track.",
|
||||
"name": "Name of the tag",
|
||||
"annotations": "Annotations associated with images using this tag",
|
||||
"from": "From is a reference to an image stream tag or image stream this tag should track",
|
||||
"reference": "Reference states if the tag will be imported. Default value is false, which means the tag will be imported.",
|
||||
"generation": "Generation is the image stream generation that updated this tag - setting it to 0 is an indication that the generation must be updated. Legacy clients will send this as nil, which means the client doesn't know or care.",
|
||||
"importPolicy": "Import is information that controls how images may be imported by the server.",
|
||||
}
|
||||
|
||||
func (TagReference) SwaggerDoc() map[string]string {
|
||||
return map_TagReference
|
||||
}
|
||||
391
vendor/github.com/openshift/origin/pkg/image/api/v1/types.go
generated
vendored
Normal file
391
vendor/github.com/openshift/origin/pkg/image/api/v1/types.go
generated
vendored
Normal file
@ -0,0 +1,391 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/unversioned"
|
||||
kapi "k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/runtime"
|
||||
)
|
||||
|
||||
// ImageList is a list of Image objects.
|
||||
type ImageList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of images
|
||||
Items []Image `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// +genclient=true
|
||||
|
||||
// Image is an immutable representation of a Docker image and metadata at a point in time.
|
||||
type Image struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// DockerImageReference is the string that can be used to pull this image.
|
||||
DockerImageReference string `json:"dockerImageReference,omitempty" protobuf:"bytes,2,opt,name=dockerImageReference"`
|
||||
// DockerImageMetadata contains metadata about this image
|
||||
DockerImageMetadata runtime.RawExtension `json:"dockerImageMetadata,omitempty" protobuf:"bytes,3,opt,name=dockerImageMetadata"`
|
||||
// DockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0"
|
||||
DockerImageMetadataVersion string `json:"dockerImageMetadataVersion,omitempty" protobuf:"bytes,4,opt,name=dockerImageMetadataVersion"`
|
||||
// DockerImageManifest is the raw JSON of the manifest
|
||||
DockerImageManifest string `json:"dockerImageManifest,omitempty" protobuf:"bytes,5,opt,name=dockerImageManifest"`
|
||||
// DockerImageLayers represents the layers in the image. May not be set if the image does not define that data.
|
||||
DockerImageLayers []ImageLayer `json:"dockerImageLayers" protobuf:"bytes,6,rep,name=dockerImageLayers"`
|
||||
// Signatures holds all signatures of the image.
|
||||
Signatures []ImageSignature `json:"signatures,omitempty" protobuf:"bytes,7,rep,name=signatures"`
|
||||
// DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.
|
||||
DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty" protobuf:"bytes,8,rep,name=dockerImageSignatures"`
|
||||
// DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2.
|
||||
DockerImageManifestMediaType string `json:"dockerImageManifestMediaType,omitempty" protobuf:"bytes,9,opt,name=dockerImageManifestMediaType"`
|
||||
// DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2.
|
||||
DockerImageConfig string `json:"dockerImageConfig,omitempty" protobuf:"bytes,10,opt,name=dockerImageConfig"`
|
||||
}
|
||||
|
||||
// ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none.
|
||||
type ImageLayer struct {
|
||||
// Name of the layer as defined by the underlying store.
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// Size of the layer in bytes as defined by the underlying store.
|
||||
LayerSize int64 `json:"size" protobuf:"varint,2,opt,name=size"`
|
||||
// MediaType of the referenced object.
|
||||
MediaType string `json:"mediaType" protobuf:"bytes,3,opt,name=mediaType"`
|
||||
}
|
||||
|
||||
// ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims
|
||||
// as long as the signature is trusted. Based on this information it is possible to restrict runnable images
|
||||
// to those matching cluster-wide policy.
|
||||
// There are two mandatory fields provided by client: Type and Content. They should be parsed by clients doing
|
||||
// image verification. The others are parsed from signature's content by the server. They serve just an
|
||||
// informative purpose.
|
||||
type ImageSignature struct {
|
||||
// Required: Describes a type of stored blob.
|
||||
Type string `json:"type" protobuf:"bytes,1,opt,name=type"`
|
||||
// Required: An opaque binary string which is an image's signature.
|
||||
Content []byte `json:"content" protobuf:"bytes,2,opt,name=content"`
|
||||
// Conditions represent the latest available observations of a signature's current state.
|
||||
Conditions []SignatureCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,3,rep,name=conditions"`
|
||||
|
||||
// Following metadata fields will be set by server if the signature content is successfully parsed and
|
||||
// the information available.
|
||||
|
||||
// A human readable string representing image's identity. It could be a product name and version, or an
|
||||
// image pull spec (e.g. "registry.access.redhat.com/rhel7/rhel:7.2").
|
||||
ImageIdentity string `json:"imageIdentity,omitempty" protobuf:"bytes,4,opt,name=imageIdentity"`
|
||||
// Contains claims from the signature.
|
||||
SignedClaims map[string]string `json:"signedClaims,omitempty" protobuf:"bytes,5,rep,name=signedClaims"`
|
||||
// If specified, it is the time of signature's creation.
|
||||
Created *unversioned.Time `json:"created,omitempty" protobuf:"bytes,6,opt,name=created"`
|
||||
// If specified, it holds information about an issuer of signing certificate or key (a person or entity
|
||||
// who signed the signing certificate or key).
|
||||
IssuedBy *SignatureIssuer `json:"issuedBy,omitempty" protobuf:"bytes,7,opt,name=issuedBy"`
|
||||
// If specified, it holds information about a subject of signing certificate or key (a person or entity
|
||||
// who signed the image).
|
||||
IssuedTo *SignatureSubject `json:"issuedTo,omitempty" protobuf:"bytes,8,opt,name=issuedTo"`
|
||||
}
|
||||
|
||||
/// SignatureConditionType is a type of image signature condition.
|
||||
type SignatureConditionType string
|
||||
|
||||
// SignatureCondition describes an image signature condition of particular kind at particular probe time.
|
||||
type SignatureCondition struct {
|
||||
// Type of job condition, Complete or Failed.
|
||||
Type SignatureConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=SignatureConditionType"`
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status kapi.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
||||
// Last time the condition was checked.
|
||||
LastProbeTime unversioned.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"`
|
||||
// Last time the condition transit from one status to another.
|
||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
|
||||
// (brief) reason for the condition's last transition.
|
||||
Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"`
|
||||
// Human readable message indicating details about last transition.
|
||||
Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
|
||||
}
|
||||
|
||||
// SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject
|
||||
// of signing certificate or key.
|
||||
type SignatureGenericEntity struct {
|
||||
// Organization name.
|
||||
Organization string `json:"organization,omitempty" protobuf:"bytes,1,opt,name=organization"`
|
||||
// Common name (e.g. openshift-signing-service).
|
||||
CommonName string `json:"commonName,omitempty" protobuf:"bytes,2,opt,name=commonName"`
|
||||
}
|
||||
|
||||
// SignatureIssuer holds information about an issuer of signing certificate or key.
|
||||
type SignatureIssuer struct {
|
||||
SignatureGenericEntity `json:",inline" protobuf:"bytes,1,opt,name=signatureGenericEntity"`
|
||||
}
|
||||
|
||||
// SignatureSubject holds information about a person or entity who created the signature.
|
||||
type SignatureSubject struct {
|
||||
SignatureGenericEntity `json:",inline" protobuf:"bytes,1,opt,name=signatureGenericEntity"`
|
||||
// If present, it is a human readable key id of public key belonging to the subject used to verify image
|
||||
// signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g.
|
||||
// 0x685ebe62bf278440).
|
||||
PublicKeyID string `json:"publicKeyID" protobuf:"bytes,2,opt,name=publicKeyID"`
|
||||
}
|
||||
|
||||
// ImageStreamList is a list of ImageStream objects.
|
||||
type ImageStreamList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is a list of imageStreams
|
||||
Items []ImageStream `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// ImageStream stores a mapping of tags to images, metadata overrides that are applied
|
||||
// when images are tagged in a stream, and an optional reference to a Docker image
|
||||
// repository on a registry.
|
||||
type ImageStream struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec describes the desired state of this stream
|
||||
Spec ImageStreamSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
// Status describes the current state of this stream
|
||||
Status ImageStreamStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// ImageStreamSpec represents options for ImageStreams.
|
||||
type ImageStreamSpec struct {
|
||||
// DockerImageRepository is optional, if specified this stream is backed by a Docker repository on this server
|
||||
DockerImageRepository string `json:"dockerImageRepository,omitempty" protobuf:"bytes,1,opt,name=dockerImageRepository"`
|
||||
// Tags map arbitrary string values to specific image locators
|
||||
Tags []TagReference `json:"tags,omitempty" protobuf:"bytes,2,rep,name=tags"`
|
||||
}
|
||||
|
||||
// TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track.
|
||||
type TagReference struct {
|
||||
// Name of the tag
|
||||
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
|
||||
// Annotations associated with images using this tag
|
||||
Annotations map[string]string `json:"annotations" protobuf:"bytes,2,rep,name=annotations"`
|
||||
// From is a reference to an image stream tag or image stream this tag should track
|
||||
From *kapi.ObjectReference `json:"from,omitempty" protobuf:"bytes,3,opt,name=from"`
|
||||
// Reference states if the tag will be imported. Default value is false, which means the tag will be imported.
|
||||
Reference bool `json:"reference,omitempty" protobuf:"varint,4,opt,name=reference"`
|
||||
// Generation is the image stream generation that updated this tag - setting it to 0 is an indication that the generation must be updated.
|
||||
// Legacy clients will send this as nil, which means the client doesn't know or care.
|
||||
Generation *int64 `json:"generation" protobuf:"varint,5,opt,name=generation"`
|
||||
// Import is information that controls how images may be imported by the server.
|
||||
ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,6,opt,name=importPolicy"`
|
||||
}
|
||||
|
||||
// TagImportPolicy describes the tag import policy
|
||||
type TagImportPolicy struct {
|
||||
// Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import.
|
||||
Insecure bool `json:"insecure,omitempty" protobuf:"varint,1,opt,name=insecure"`
|
||||
// Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported
|
||||
Scheduled bool `json:"scheduled,omitempty" protobuf:"varint,2,opt,name=scheduled"`
|
||||
}
|
||||
|
||||
// ImageStreamStatus contains information about the state of this image stream.
|
||||
type ImageStreamStatus struct {
|
||||
// DockerImageRepository represents the effective location this stream may be accessed at.
|
||||
// May be empty until the server determines where the repository is located
|
||||
DockerImageRepository string `json:"dockerImageRepository" protobuf:"bytes,1,opt,name=dockerImageRepository"`
|
||||
// Tags are a historical record of images associated with each tag. The first entry in the
|
||||
// TagEvent array is the currently tagged image.
|
||||
Tags []NamedTagEventList `json:"tags,omitempty" protobuf:"bytes,2,rep,name=tags"`
|
||||
}
|
||||
|
||||
// NamedTagEventList relates a tag to its image history.
|
||||
type NamedTagEventList struct {
|
||||
// Tag is the tag for which the history is recorded
|
||||
Tag string `json:"tag" protobuf:"bytes,1,opt,name=tag"`
|
||||
// Standard object's metadata.
|
||||
Items []TagEvent `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
// Conditions is an array of conditions that apply to the tag event list.
|
||||
Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"`
|
||||
}
|
||||
|
||||
// TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag.
|
||||
type TagEvent struct {
|
||||
// Created holds the time the TagEvent was created
|
||||
Created unversioned.Time `json:"created" protobuf:"bytes,1,opt,name=created"`
|
||||
// DockerImageReference is the string that can be used to pull this image
|
||||
DockerImageReference string `json:"dockerImageReference" protobuf:"bytes,2,opt,name=dockerImageReference"`
|
||||
// Image is the image
|
||||
Image string `json:"image" protobuf:"bytes,3,opt,name=image"`
|
||||
// Generation is the spec tag generation that resulted in this tag being updated
|
||||
Generation int64 `json:"generation" protobuf:"varint,4,opt,name=generation"`
|
||||
}
|
||||
|
||||
type TagEventConditionType string
|
||||
|
||||
// These are valid conditions of TagEvents.
|
||||
const (
|
||||
// ImportSuccess with status False means the import of the specific tag failed
|
||||
ImportSuccess TagEventConditionType = "ImportSuccess"
|
||||
)
|
||||
|
||||
// TagEventCondition contains condition information for a tag event.
|
||||
type TagEventCondition struct {
|
||||
// Type of tag event condition, currently only ImportSuccess
|
||||
Type TagEventConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=TagEventConditionType"`
|
||||
// Status of the condition, one of True, False, Unknown.
|
||||
Status kapi.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"`
|
||||
// LastTransitionTIme is the time the condition transitioned from one status to another.
|
||||
LastTransitionTime unversioned.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"`
|
||||
// Reason is a brief machine readable explanation for the condition's last transition.
|
||||
Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"`
|
||||
// Message is a human readable description of the details about last transition, complementing reason.
|
||||
Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"`
|
||||
// Generation is the spec tag generation that this status corresponds to
|
||||
Generation int64 `json:"generation" protobuf:"varint,6,opt,name=generation"`
|
||||
}
|
||||
|
||||
// ImageStreamMapping represents a mapping from a single tag to a Docker image as
|
||||
// well as the reference to the Docker image stream the image came from.
|
||||
type ImageStreamMapping struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Image is a Docker image.
|
||||
Image Image `json:"image" protobuf:"bytes,2,opt,name=image"`
|
||||
// Tag is a string value this image can be located with inside the stream.
|
||||
Tag string `json:"tag" protobuf:"bytes,3,opt,name=tag"`
|
||||
}
|
||||
|
||||
// ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream.
|
||||
type ImageStreamTag struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Tag is the spec tag associated with this image stream tag, and it may be null
|
||||
// if only pushes have occurred to this image stream.
|
||||
Tag *TagReference `json:"tag" protobuf:"bytes,2,opt,name=tag"`
|
||||
|
||||
// Generation is the current generation of the tagged image - if tag is provided
|
||||
// and this value is not equal to the tag generation, a user has requested an
|
||||
// import that has not completed, or Conditions will be filled out indicating any
|
||||
// error.
|
||||
Generation int64 `json:"generation" protobuf:"varint,3,opt,name=generation"`
|
||||
|
||||
// Conditions is an array of conditions that apply to the image stream tag.
|
||||
Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,4,rep,name=conditions"`
|
||||
|
||||
// Image associated with the ImageStream and tag.
|
||||
Image Image `json:"image" protobuf:"bytes,5,opt,name=image"`
|
||||
}
|
||||
|
||||
// ImageStreamTagList is a list of ImageStreamTag objects.
|
||||
type ImageStreamTagList struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
unversioned.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Items is the list of image stream tags
|
||||
Items []ImageStreamTag `json:"items" protobuf:"bytes,2,rep,name=items"`
|
||||
}
|
||||
|
||||
// ImageStreamImage represents an Image that is retrieved by image name from an ImageStream.
|
||||
type ImageStreamImage struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Image associated with the ImageStream and image name.
|
||||
Image Image `json:"image" protobuf:"bytes,2,opt,name=image"`
|
||||
}
|
||||
|
||||
// DockerImageReference points to a Docker image.
|
||||
type DockerImageReference struct {
|
||||
// Registry is the registry that contains the Docker image
|
||||
Registry string `protobuf:"bytes,1,opt,name=registry"`
|
||||
// Namespace is the namespace that contains the Docker image
|
||||
Namespace string `protobuf:"bytes,2,opt,name=namespace"`
|
||||
// Name is the name of the Docker image
|
||||
Name string `protobuf:"bytes,3,opt,name=name"`
|
||||
// Tag is which tag of the Docker image is being referenced
|
||||
Tag string `protobuf:"bytes,4,opt,name=tag"`
|
||||
// ID is the identifier for the Docker image
|
||||
ID string `protobuf:"bytes,5,opt,name=iD"`
|
||||
}
|
||||
|
||||
// ImageStreamImport imports an image from remote repositories into OpenShift.
|
||||
type ImageStreamImport struct {
|
||||
unversioned.TypeMeta `json:",inline"`
|
||||
// Standard object's metadata.
|
||||
kapi.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
|
||||
|
||||
// Spec is a description of the images that the user wishes to import
|
||||
Spec ImageStreamImportSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"`
|
||||
// Status is the the result of importing the image
|
||||
Status ImageStreamImportStatus `json:"status" protobuf:"bytes,3,opt,name=status"`
|
||||
}
|
||||
|
||||
// ImageStreamImportSpec defines what images should be imported.
|
||||
type ImageStreamImportSpec struct {
|
||||
// Import indicates whether to perform an import - if so, the specified tags are set on the spec
|
||||
// and status of the image stream defined by the type meta.
|
||||
Import bool `json:"import" protobuf:"varint,1,opt,name=import"`
|
||||
// Repository is an optional import of an entire Docker image repository. A maximum limit on the
|
||||
// number of tags imported this way is imposed by the server.
|
||||
Repository *RepositoryImportSpec `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"`
|
||||
// Images are a list of individual images to import.
|
||||
Images []ImageImportSpec `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"`
|
||||
}
|
||||
|
||||
// ImageStreamImportStatus contains information about the status of an image stream import.
|
||||
type ImageStreamImportStatus struct {
|
||||
// Import is the image stream that was successfully updated or created when 'to' was set.
|
||||
Import *ImageStream `json:"import,omitempty" protobuf:"bytes,1,opt,name=import"`
|
||||
// Repository is set if spec.repository was set to the outcome of the import
|
||||
Repository *RepositoryImportStatus `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"`
|
||||
// Images is set with the result of importing spec.images
|
||||
Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"`
|
||||
}
|
||||
|
||||
// RepositoryImportSpec describes a request to import images from a Docker image repository.
|
||||
type RepositoryImportSpec struct {
|
||||
// From is the source for the image repository to import; only kind DockerImage and a name of a Docker image repository is allowed
|
||||
From kapi.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"`
|
||||
|
||||
// ImportPolicy is the policy controlling how the image is imported
|
||||
ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,2,opt,name=importPolicy"`
|
||||
// IncludeManifest determines if the manifest for each image is returned in the response
|
||||
IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,3,opt,name=includeManifest"`
|
||||
}
|
||||
|
||||
// RepositoryImportStatus describes the result of an image repository import
|
||||
type RepositoryImportStatus struct {
|
||||
// Status reflects whether any failure occurred during import
|
||||
Status unversioned.Status `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"`
|
||||
// Images is a list of images successfully retrieved by the import of the repository.
|
||||
Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,2,rep,name=images"`
|
||||
// AdditionalTags are tags that exist in the repository but were not imported because
|
||||
// a maximum limit of automatic imports was applied.
|
||||
AdditionalTags []string `json:"additionalTags,omitempty" protobuf:"bytes,3,rep,name=additionalTags"`
|
||||
}
|
||||
|
||||
// ImageImportSpec describes a request to import a specific image.
|
||||
type ImageImportSpec struct {
|
||||
// From is the source of an image to import; only kind DockerImage is allowed
|
||||
From kapi.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"`
|
||||
// To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used
|
||||
To *kapi.LocalObjectReference `json:"to,omitempty" protobuf:"bytes,2,opt,name=to"`
|
||||
|
||||
// ImportPolicy is the policy controlling how the image is imported
|
||||
ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,3,opt,name=importPolicy"`
|
||||
// IncludeManifest determines if the manifest for each image is returned in the response
|
||||
IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,4,opt,name=includeManifest"`
|
||||
}
|
||||
|
||||
// ImageImportStatus describes the result of an image import.
|
||||
type ImageImportStatus struct {
|
||||
// Status is the status of the image import, including errors encountered while retrieving the image
|
||||
Status unversioned.Status `json:"status" protobuf:"bytes,1,opt,name=status"`
|
||||
// Image is the metadata of that image, if the image was located
|
||||
Image *Image `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"`
|
||||
// Tag is the tag this image was located under, if any
|
||||
Tag string `json:"tag,omitempty" protobuf:"bytes,3,opt,name=tag"`
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user