提交 4b738830 编写于 作者: R runzexia 提交者: zryfish

update s2i to v0.0.7

上级 aa4d07c8
......@@ -57,7 +57,7 @@ required = [
[[constraint]]
name="github.com/kubesphere/s2ioperator"
version="v0.0.4"
version="v0.0.7"
[[override]]
name="github.com/bifurcation/mint"
......
......@@ -19,6 +19,7 @@ package v1alpha1
import (
"fmt"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
......@@ -101,10 +102,11 @@ type DockerConfig struct {
// AuthConfig is our abstraction of the Registry authorization information for whatever
// docker client we happen to be based on
type AuthConfig struct {
Username string `json:"username"`
Password string `json:"password"`
Email string `json:"email,omitempty"`
ServerAddress string `json:"server_address,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
Email string `json:"email,omitempty"`
ServerAddress string `json:"server_address,omitempty"`
SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
}
// ContainerConfig is the abstraction of the docker client provider (formerly go-dockerclient, now either
......@@ -229,7 +231,7 @@ type S2iConfig struct {
// RuntimeAuthentication holds the authentication information for pulling the
// runtime Docker images from private repositories.
RuntimeAuthentication AuthConfig `json:"runtimeAuthentication,omitempty"`
RuntimeAuthentication *AuthConfig `json:"runtimeAuthentication,omitempty"`
// RuntimeArtifacts specifies a list of source/destination pairs that will
// be copied from builder to a runtime image. Source can be a file or
......@@ -246,15 +248,15 @@ type S2iConfig struct {
// PullAuthentication holds the authentication information for pulling the
// Docker images from private repositories
PullAuthentication AuthConfig `json:"pullAuthentication,omitempty"`
PullAuthentication *AuthConfig `json:"pullAuthentication,omitempty"`
// PullAuthentication holds the authentication information for pulling the
// Docker images from private repositories
PushAuthentication AuthConfig `json:"pushAuthentication,omitempty"`
PushAuthentication *AuthConfig `json:"pushAuthentication,omitempty"`
// IncrementalAuthentication holds the authentication information for pulling the
// previous image from private repositories
IncrementalAuthentication AuthConfig `json:"incrementalAuthentication,omitempty"`
IncrementalAuthentication *AuthConfig `json:"incrementalAuthentication,omitempty"`
// DockerNetworkMode is used to set the docker network setting to --net=container:<id>
// when the builder is invoked from a container.
......@@ -390,6 +392,9 @@ type S2iConfig struct {
//SourceURL is url of the codes such as https://github.com/a/b.git
SourceURL string `json:"sourceUrl"`
//GitSecretRef is the BasicAuth Secret of Git Clone
GitSecretRef *corev1.LocalObjectReference `json:"gitSecretRef,omitempty"`
}
type UserDefineTemplate struct {
......@@ -454,6 +459,21 @@ type S2iAutoScale struct {
Containers []string `json:"containers,omitempty"`
}
type DockerConfigJson struct {
Auths DockerConfigMap `json:"auths"`
}
// DockerConfig represents the config file used by the docker CLI.
// This config that represents the credentials that should be used
// when pulling images from specific image repositories.
type DockerConfigMap map[string]DockerConfigEntry
type DockerConfigEntry struct {
Username string `json:"username"`
Password string `json:"password"`
Email string `json:"email"`
}
func init() {
SchemeBuilder.Register(&S2iBuilder{}, &S2iBuilderList{})
}
......@@ -15,17 +15,23 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by deepcopy-gen. DO NOT EDIT.
// Code generated by main. DO NOT EDIT.
package v1alpha1
import (
v1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AuthConfig) DeepCopyInto(out *AuthConfig) {
*out = *in
if in.SecretRef != nil {
in, out := &in.SecretRef, &out.SecretRef
*out = new(v1.LocalObjectReference)
**out = **in
}
return
}
......@@ -99,6 +105,67 @@ func (in *DockerConfig) DeepCopy() *DockerConfig {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DockerConfigEntry) DeepCopyInto(out *DockerConfigEntry) {
*out = *in
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigEntry.
func (in *DockerConfigEntry) DeepCopy() *DockerConfigEntry {
if in == nil {
return nil
}
out := new(DockerConfigEntry)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DockerConfigJson) DeepCopyInto(out *DockerConfigJson) {
*out = *in
if in.Auths != nil {
in, out := &in.Auths, &out.Auths
*out = make(DockerConfigMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigJson.
func (in *DockerConfigJson) DeepCopy() *DockerConfigJson {
if in == nil {
return nil
}
out := new(DockerConfigJson)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in DockerConfigMap) DeepCopyInto(out *DockerConfigMap) {
{
in := &in
*out = make(DockerConfigMap, len(*in))
for key, val := range *in {
(*out)[key] = val
}
return
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfigMap.
func (in DockerConfigMap) DeepCopy() DockerConfigMap {
if in == nil {
return nil
}
out := new(DockerConfigMap)
in.DeepCopyInto(out)
return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvironmentSpec) DeepCopyInto(out *EnvironmentSpec) {
*out = *in
......@@ -394,7 +461,11 @@ func (in *S2iBuilderTemplateStatus) DeepCopy() *S2iBuilderTemplateStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *S2iConfig) DeepCopyInto(out *S2iConfig) {
*out = *in
out.RuntimeAuthentication = in.RuntimeAuthentication
if in.RuntimeAuthentication != nil {
in, out := &in.RuntimeAuthentication, &out.RuntimeAuthentication
*out = new(AuthConfig)
(*in).DeepCopyInto(*out)
}
if in.RuntimeArtifacts != nil {
in, out := &in.RuntimeArtifacts, &out.RuntimeArtifacts
*out = make([]VolumeSpec, len(*in))
......@@ -405,9 +476,21 @@ func (in *S2iConfig) DeepCopyInto(out *S2iConfig) {
*out = new(DockerConfig)
**out = **in
}
out.PullAuthentication = in.PullAuthentication
out.PushAuthentication = in.PushAuthentication
out.IncrementalAuthentication = in.IncrementalAuthentication
if in.PullAuthentication != nil {
in, out := &in.PullAuthentication, &out.PullAuthentication
*out = new(AuthConfig)
(*in).DeepCopyInto(*out)
}
if in.PushAuthentication != nil {
in, out := &in.PushAuthentication, &out.PushAuthentication
*out = new(AuthConfig)
(*in).DeepCopyInto(*out)
}
if in.IncrementalAuthentication != nil {
in, out := &in.IncrementalAuthentication, &out.IncrementalAuthentication
*out = new(AuthConfig)
(*in).DeepCopyInto(*out)
}
if in.Environment != nil {
in, out := &in.Environment, &out.Environment
*out = make([]EnvironmentSpec, len(*in))
......@@ -455,6 +538,11 @@ func (in *S2iConfig) DeepCopyInto(out *S2iConfig) {
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.GitSecretRef != nil {
in, out := &in.GitSecretRef, &out.GitSecretRef
*out = new(v1.LocalObjectReference)
**out = **in
}
return
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册