create LocalObjectReference

This commit is contained in:
deads2k
2015-05-19 08:39:46 -04:00
parent 0c14e0cbdb
commit 5458f05679
11 changed files with 89 additions and 46 deletions

View File

@@ -834,7 +834,7 @@ type PodSpec struct {
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
// in the case of docker, only DockerConfig type secrets are honored.
ImagePullSecrets []ObjectReference `json:"imagePullSecrets,omitempty" description:"list of references to secrets in the same namespace available for pulling the container images"`
ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" description:"list of references to secrets in the same namespace available for pulling the container images"`
}
// PodStatus represents information about the status of a pod. Status may trail the actual
@@ -1635,6 +1635,12 @@ type ObjectReference struct {
FieldPath string `json:"fieldPath,omitempty"`
}
// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
type LocalObjectReference struct {
//TODO: Add other useful fields. apiVersion, kind, uid?
Name string
}
type SerializedReference struct {
TypeMeta `json:",inline"`
Reference ObjectReference `json:"reference,omitempty" description:"the reference to an object in the system"`
@@ -1712,7 +1718,7 @@ type ContainerManifest struct {
// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
// in the case of docker, only DockerConfig type secrets are honored.
ImagePullSecrets []ObjectReference `json:"imagePullSecrets,omitempty" description:"list of references to secrets in the same namespace available for pulling the container images"`
ImagePullSecrets []LocalObjectReference `json:"imagePullSecrets,omitempty" description:"list of references to secrets in the same namespace available for pulling the container images"`
}
// ContainerManifestList is used to communicate container manifests to kubelet.