mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Add support for git volumes.
This commit is contained in:
@@ -147,8 +147,8 @@ type VolumeSource struct {
|
||||
// GCEPersistentDisk represents a GCE Disk resource that is attached to a
|
||||
// kubelet's host machine and then exposed to the pod.
|
||||
GCEPersistentDisk *GCEPersistentDisk `json:"persistentDisk" yaml:"persistentDisk"`
|
||||
// GitVolume represents a git repository at a particular revision.
|
||||
GitVolume *GitVolume `json:"gitVolume" yaml:"gitVolume"`
|
||||
// GitRepo represents a git repository at a particular revision.
|
||||
GitRepo *GitRepo `json:"gitRepo" yaml:"gitRepo"`
|
||||
}
|
||||
|
||||
// HostDir represents bare host directory volume.
|
||||
@@ -189,9 +189,13 @@ type GCEPersistentDisk struct {
|
||||
ReadOnly bool `yaml:"readOnly,omitempty" json:"readOnly,omitempty"`
|
||||
}
|
||||
|
||||
type GitVolume struct {
|
||||
// GitRepo represents a volume that is pulled from git when the pod is created.
|
||||
type GitRepo struct {
|
||||
// Repository URL
|
||||
Repository string
|
||||
Repository string `yaml:"repository" json:"repository"`
|
||||
// Commit hash, this is optional
|
||||
Revision string `yaml:"revision" json:"revision"`
|
||||
// TODO: Consider credentials here.
|
||||
}
|
||||
|
||||
// Port represents a network port in a single container
|
||||
|
||||
@@ -93,6 +93,8 @@ type VolumeSource struct {
|
||||
// GCEPersistentDisk represents a GCE Disk resource that is attached to a
|
||||
// kubelet's host machine and then exposed to the pod.
|
||||
GCEPersistentDisk *GCEPersistentDisk `yaml:"persistentDisk" json:"persistentDisk"`
|
||||
// GitRepo represents a git repository at a particular revision.
|
||||
GitRepo *GitRepo `json:"gitRepo" yaml:"gitRepo"`
|
||||
}
|
||||
|
||||
// HostDir represents bare host directory volume.
|
||||
@@ -133,6 +135,14 @@ type GCEPersistentDisk struct {
|
||||
ReadOnly bool `yaml:"readOnly,omitempty" json:"readOnly,omitempty"`
|
||||
}
|
||||
|
||||
// GitRepo represents a volume that is pulled from git when the pod is created.
|
||||
type GitRepo struct {
|
||||
// Repository URL
|
||||
Repository string `yaml:"repository" json:"repository"`
|
||||
// Commit hash, this is optional
|
||||
Revision string `yaml:"revision" json:"revision"`
|
||||
}
|
||||
|
||||
// Port represents a network port in a single container
|
||||
type Port struct {
|
||||
// Optional: If specified, this must be a DNS_LABEL. Each named port
|
||||
|
||||
@@ -69,6 +69,8 @@ type VolumeSource struct {
|
||||
// A persistent disk that is mounted to the
|
||||
// kubelet's host machine and then exposed to the pod.
|
||||
GCEPersistentDisk *GCEPersistentDisk `yaml:"persistentDisk" json:"persistentDisk"`
|
||||
// GitRepo represents a git repository at a particular revision.
|
||||
GitRepo *GitRepo `json:"gitRepo" yaml:"gitRepo"`
|
||||
}
|
||||
|
||||
// HostDir represents bare host directory volume.
|
||||
@@ -124,6 +126,14 @@ type GCEPersistentDisk struct {
|
||||
ReadOnly bool `yaml:"readOnly,omitempty" json:"readOnly,omitempty"`
|
||||
}
|
||||
|
||||
// GitRepo represents a volume that is pulled from git when the pod is created.
|
||||
type GitRepo struct {
|
||||
// Repository URL
|
||||
Repository string `yaml:"repository" json:"repository"`
|
||||
// Commit hash, this is optional
|
||||
Revision string `yaml:"revision" json:"revision"`
|
||||
}
|
||||
|
||||
// VolumeMount describes a mounting of a Volume within a container.
|
||||
type VolumeMount struct {
|
||||
// Required: This must match the Name of a Volume [above].
|
||||
|
||||
@@ -178,6 +178,8 @@ type VolumeSource struct {
|
||||
// GCEPersistentDisk represents a GCE Disk resource that is attached to a
|
||||
// kubelet's host machine and then exposed to the pod.
|
||||
GCEPersistentDisk *GCEPersistentDisk `yaml:"persistentDisk" json:"persistentDisk"`
|
||||
// GitRepo represents a git repository at a particular revision.
|
||||
GitRepo *GitRepo `json:"gitRepo" yaml:"gitRepo"`
|
||||
}
|
||||
|
||||
// HostDir represents bare host directory volume.
|
||||
@@ -218,6 +220,14 @@ type GCEPersistentDisk struct {
|
||||
ReadOnly bool `yaml:"readOnly,omitempty" json:"readOnly,omitempty"`
|
||||
}
|
||||
|
||||
// GitRepo represents a volume that is pulled from git when the pod is created.
|
||||
type GitRepo struct {
|
||||
// Repository URL
|
||||
Repository string `yaml:"repository" json:"repository"`
|
||||
// Commit hash, this is optional
|
||||
Revision string `yaml:"revision" json:"revision"`
|
||||
}
|
||||
|
||||
// Port represents a network port in a single container.
|
||||
type Port struct {
|
||||
// Optional: If specified, this must be a DNS_LABEL. Each named port
|
||||
|
||||
Reference in New Issue
Block a user