From 27da9c8b1d7c44f7bd47ef7d516214909db36e3f Mon Sep 17 00:00:00 2001 From: Lun-Kai Hsu Date: Mon, 14 Oct 2019 21:13:51 -0700 Subject: [PATCH] KfConfig changes (#4295) * port changes from 4250 * cleanup --- .../apis/apps/configconverters/converters.go | 12 +- .../testdata/kfconfig_v1alpha1.yaml | 3 + .../testdata/kfconfig_v1beta1.yaml | 1 + .../apis/apps/configconverters/v1alpha1.go | 43 ++- .../apps/configconverters/v1alpha1_test.go | 5 +- .../pkg/apis/apps/configconverters/v1beta1.go | 3 + .../apps/configconverters/v1beta1_test.go | 3 +- bootstrap/pkg/apis/apps/kfconfig/types.go | 319 +++++++++++++++++- .../apps/kfconfig/zz_generated.deepcopy.go | 53 +++ 9 files changed, 415 insertions(+), 27 deletions(-) diff --git a/bootstrap/pkg/apis/apps/configconverters/converters.go b/bootstrap/pkg/apis/apps/configconverters/converters.go index 28f3bd67dcc..8cd7c542522 100644 --- a/bootstrap/pkg/apis/apps/configconverters/converters.go +++ b/bootstrap/pkg/apis/apps/configconverters/converters.go @@ -2,6 +2,8 @@ package configconverters import ( "fmt" + "os" + "github.com/ghodss/yaml" gogetter "github.com/hashicorp/go-getter" kfapis "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/apis" @@ -123,7 +125,15 @@ func LoadConfigFromURI(configFile string) (*kfconfig.KfConfig, error) { strings.Join(versions, ", "), apiVersionSeparated[1]), } } - return converter.ToKfConfig(appDir, configFileBytes) + cwd, err := os.Getwd() + if err != nil { + return nil, &kfapis.KfError{ + Code: int(kfapis.INTERNAL_ERROR), + Message: fmt.Sprintf("could not get current directory for KfDef %v", err), + } + } + + return converter.ToKfConfig(cwd, configFileBytes) } func WriteConfigToFile(config kfconfig.KfConfig, filename string) error { diff --git a/bootstrap/pkg/apis/apps/configconverters/testdata/kfconfig_v1alpha1.yaml b/bootstrap/pkg/apis/apps/configconverters/testdata/kfconfig_v1alpha1.yaml index aadaf65123e..df744f60f72 100644 --- a/bootstrap/pkg/apis/apps/configconverters/testdata/kfconfig_v1alpha1.yaml +++ b/bootstrap/pkg/apis/apps/configconverters/testdata/kfconfig_v1alpha1.yaml @@ -6,6 +6,7 @@ metadata: namespace: kubeflow spec: appDir: /tmp/myapp2 + platform: gcp project: foo-project email: foo@gmail.com applications: @@ -331,4 +332,6 @@ spec: repos: - name: manifests uri: https://github.com/kubeflow/manifests/archive/master.tar.gz + skipInitProject: true + useIstio: true status: {} diff --git a/bootstrap/pkg/apis/apps/configconverters/testdata/kfconfig_v1beta1.yaml b/bootstrap/pkg/apis/apps/configconverters/testdata/kfconfig_v1beta1.yaml index 9232d7380e6..adf0790117e 100644 --- a/bootstrap/pkg/apis/apps/configconverters/testdata/kfconfig_v1beta1.yaml +++ b/bootstrap/pkg/apis/apps/configconverters/testdata/kfconfig_v1beta1.yaml @@ -330,4 +330,5 @@ spec: repos: - name: manifests uri: https://github.com/kubeflow/manifests/archive/master.tar.gz + SkipInitProject: true status: {} diff --git a/bootstrap/pkg/apis/apps/configconverters/v1alpha1.go b/bootstrap/pkg/apis/apps/configconverters/v1alpha1.go index bdb0f1f0cc8..8357961e889 100644 --- a/bootstrap/pkg/apis/apps/configconverters/v1alpha1.go +++ b/bootstrap/pkg/apis/apps/configconverters/v1alpha1.go @@ -9,6 +9,7 @@ import ( kfconfig "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/apis/apps/kfconfig" kfdeftypes "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/apis/apps/kfdef/v1alpha1" kfgcp "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/kfapp/gcp" + log "github.com/sirupsen/logrus" ) // Empty struct - used to implement Converter interface. @@ -52,6 +53,7 @@ func copyGcpPluginSpec(from *kfdeftypes.KfDef, to *kfconfig.KfConfig) error { } func (v V1alpha1) ToKfConfig(appdir string, kfdefBytes []byte) (*kfconfig.KfConfig, error) { + log.Infof("converting to kfconfig, appdir=%v", appdir) kfdef := &kfdeftypes.KfDef{} if err := yaml.Unmarshal(kfdefBytes, kfdef); err != nil { return nil, &kfapis.KfError{ @@ -62,13 +64,16 @@ func (v V1alpha1) ToKfConfig(appdir string, kfdefBytes []byte) (*kfconfig.KfConf config := &kfconfig.KfConfig{ Spec: kfconfig.KfConfigSpec{ - AppDir: kfdef.Spec.AppDir, - UseBasicAuth: kfdef.Spec.UseBasicAuth, - Project: kfdef.Spec.Project, - Email: kfdef.Spec.Email, - IpName: kfdef.Spec.IpName, - Hostname: kfdef.Spec.Hostname, - Zone: kfdef.Spec.Zone, + AppDir: kfdef.Spec.AppDir, + UseBasicAuth: kfdef.Spec.UseBasicAuth, + Project: kfdef.Spec.Project, + Email: kfdef.Spec.Email, + IpName: kfdef.Spec.IpName, + Hostname: kfdef.Spec.Hostname, + SkipInitProject: kfdef.Spec.SkipInitProject, + Zone: kfdef.Spec.Zone, + Platform: kfdef.Spec.Platform, + UseIstio: true, }, } if config.Spec.AppDir == "" { @@ -144,6 +149,10 @@ func (v V1alpha1) ToKfConfig(appdir string, kfdefBytes []byte) (*kfconfig.KfConf src.EnvSource = &kfconfig.EnvSource{ Name: secret.SecretSource.EnvSource.Name, } + } else if secret.SecretSource.HashedSource != nil { + src.HashedSource = &kfconfig.HashedSource{ + HashedValue: secret.SecretSource.HashedSource.HashedValue, + } } s.SecretSource = src config.Spec.Secrets = append(config.Spec.Secrets, s) @@ -245,12 +254,13 @@ func (v V1alpha1) ToKfDefSerialized(config kfconfig.KfConfig) ([]byte, error) { platform = kftypesv3.GCP } } - if platform == "" { - return []byte(""), &kfapis.KfError{ - Code: int(kfapis.INVALID_ARGUMENT), - Message: "Not able to find platform in plugins", - } - } + // TODO: Platform is not always needed? + // if platform == "" { + // return []byte(""), &kfapis.KfError{ + // Code: int(kfapis.INVALID_ARGUMENT), + // Message: "Not able to find platform in plugins", + // } + // } kfdef.Spec.Platform = platform for _, secret := range config.Spec.Secrets { @@ -269,6 +279,11 @@ func (v V1alpha1) ToKfDefSerialized(config kfconfig.KfConfig) ([]byte, error) { Name: secret.SecretSource.EnvSource.Name, } } + if secret.SecretSource.HashedSource != nil { + s.SecretSource.HashedSource = &kfdeftypes.HashedSource{ + HashedValue: secret.SecretSource.HashedSource.HashedValue, + } + } } kfdef.Spec.Secrets = append(kfdef.Spec.Secrets, s) } @@ -281,6 +296,7 @@ func (v V1alpha1) ToKfDefSerialized(config kfconfig.KfConfig) ([]byte, error) { kfdef.Spec.Repos = append(kfdef.Spec.Repos, r) } + kfdef.Status = kfdeftypes.KfDefStatus{} for _, cond := range config.Status.Conditions { c := kfdeftypes.KfDefCondition{ Type: kfdeftypes.KfDefConditionType(cond.Type), @@ -293,6 +309,7 @@ func (v V1alpha1) ToKfDefSerialized(config kfconfig.KfConfig) ([]byte, error) { kfdef.Status.Conditions = append(kfdef.Status.Conditions, c) } + kfdef.Status.ReposCache = make(map[string]kfdeftypes.RepoCache) for _, cache := range config.Status.Caches { kfdef.Status.ReposCache[cache.Name] = kfdeftypes.RepoCache{ LocalPath: cache.LocalPath, diff --git a/bootstrap/pkg/apis/apps/configconverters/v1alpha1_test.go b/bootstrap/pkg/apis/apps/configconverters/v1alpha1_test.go index 01e0544af45..626cfaf942c 100644 --- a/bootstrap/pkg/apis/apps/configconverters/v1alpha1_test.go +++ b/bootstrap/pkg/apis/apps/configconverters/v1alpha1_test.go @@ -2,6 +2,7 @@ package configconverters import ( "github.com/ghodss/yaml" + "github.com/google/go-cmp/cmp" kftypes "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/apis/apps" kfconfig "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/apis/apps/kfconfig" kfdeftypes "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/apis/apps/kfdef/v1alpha1" @@ -56,7 +57,7 @@ func TestV1alpha1_ConvertToKfConfigs(t *testing.T) { if !reflect.DeepEqual(config, expectedConfig) { pGot := kfutils.PrettyPrint(config) pWant := kfutils.PrettyPrint(expectedConfig) - t.Errorf("Loaded KfConfig doesn't match;\nexpected\n%v\ngot\n%v\n", pWant, pGot) + t.Errorf("Loaded KfConfig doesn't match: %v", cmp.Diff(pGot, pWant)) } } } @@ -126,7 +127,7 @@ func TestV1alpha1_ConvertToKfDef(t *testing.T) { if !reflect.DeepEqual(got, want) { pGot := kfutils.PrettyPrint(got) pWant := kfutils.PrettyPrint(want) - t.Errorf("Loaded KfConfig doesn't match;\nexpected\n%v\ngot\n%v\n", pWant, pGot) + t.Errorf("Loaded KfConfig doesn't match: %v", cmp.Diff(pGot, pWant)) } } } diff --git a/bootstrap/pkg/apis/apps/configconverters/v1beta1.go b/bootstrap/pkg/apis/apps/configconverters/v1beta1.go index 43961eb6c3d..001b54ac30e 100644 --- a/bootstrap/pkg/apis/apps/configconverters/v1beta1.go +++ b/bootstrap/pkg/apis/apps/configconverters/v1beta1.go @@ -101,6 +101,9 @@ func (v V1beta1) ToKfConfig(appdir string, kfdefBytes []byte) (*kfconfig.KfConfi if h, ok := s["hostname"]; ok { config.Spec.Hostname = h.(string) } + if h, ok := s["skipInitProject"]; ok { + config.Spec.SkipInitProject = h.(bool) + } if z, ok := s["zone"]; ok { config.Spec.Zone = z.(string) } diff --git a/bootstrap/pkg/apis/apps/configconverters/v1beta1_test.go b/bootstrap/pkg/apis/apps/configconverters/v1beta1_test.go index 359353adec8..0fb2887a004 100644 --- a/bootstrap/pkg/apis/apps/configconverters/v1beta1_test.go +++ b/bootstrap/pkg/apis/apps/configconverters/v1beta1_test.go @@ -2,6 +2,7 @@ package configconverters import ( "github.com/ghodss/yaml" + "github.com/google/go-cmp/cmp" kfconfig "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/apis/apps/kfconfig" kfutils "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/utils" "io/ioutil" @@ -53,7 +54,7 @@ func TestV1beta1_expectedConfig(t *testing.T) { if !reflect.DeepEqual(config, expectedConfig) { pGot := kfutils.PrettyPrint(config) pWant := kfutils.PrettyPrint(expectedConfig) - t.Errorf("Loaded KfConfig doesn't match;\nexpected\n%v\ngot\n%v\n", pWant, pGot) + t.Errorf("Loaded KfConfig doesn't match %v", cmp.Diff(pGot, pWant)) } } diff --git a/bootstrap/pkg/apis/apps/kfconfig/types.go b/bootstrap/pkg/apis/apps/kfconfig/types.go index a9dc385e0ba..89722d1b540 100644 --- a/bootstrap/pkg/apis/apps/kfconfig/types.go +++ b/bootstrap/pkg/apis/apps/kfconfig/types.go @@ -2,13 +2,25 @@ package kfconfig import ( "fmt" + "io/ioutil" + "os" + "path" + "strings" + "github.com/ghodss/yaml" - kfapis "github.com/kubeflow/kfctl/v3/pkg/apis" + gogetter "github.com/hashicorp/go-getter" + "github.com/hashicorp/go-getter/helper/url" + kfapis "github.com/kubeflow/kubeflow/bootstrap/v3/pkg/apis" + "github.com/pkg/errors" log "github.com/sirupsen/logrus" "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "strings" +) + +const ( + KfConfigFile = "app.yaml" + DefaultCacheDir = ".cache" ) // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -31,12 +43,18 @@ type KfConfigSpec struct { // TODO(gabrielwen): Can we infer this from Applications? UseBasicAuth bool `json:"useBasicAuth,omitempty"` + Platform string `json:"platform,omitempty"` + // TODO(gabrielwen): Deprecate these fields as they only makes sense to GCP. - Project string `json:"project,omitempty"` - Email string `json:"email,omitempty"` - IpName string `json:"ipName,omitempty"` - Hostname string `json:"hostname,omitempty"` - Zone string `json:"zone,omitempty"` + Project string `json:"project,omitempty"` + Email string `json:"email,omitempty"` + IpName string `json:"ipName,omitempty"` + Hostname string `json:"hostname,omitempty"` + SkipInitProject bool `json:"skipInitProject,omitempty"` + Zone string `json:"zone,omitempty"` + + DeleteStorage bool `json:"deleteStorage,omitempty"` + UseIstio bool `json:"useIstio"` Applications []Application `json:"applications,omitempty"` Plugins []Plugin `json:"plugins,omitempty"` @@ -82,6 +100,7 @@ type Secret struct { type SecretSource struct { LiteralSource *LiteralSource `json:"literalSource,omitempty"` + HashedSource *HashedSource `json:"hashedSource,omitempty"` EnvSource *EnvSource `json:"envSource,omitempty"` } @@ -89,6 +108,10 @@ type LiteralSource struct { Value string `json:"value,omitempty"` } +type HashedSource struct { + HashedValue string `json:"value,omitempty"` +} + type EnvSource struct { Name string `json:"name,omitempty"` } @@ -130,6 +153,11 @@ type Condition struct { Message string `json:"message,omitempty"` } +type Cache struct { + Name string `json:"name,omitempty"` + LocalPath string `json:"localPath,omitempty"` +} + type PluginKindType string const ( @@ -170,9 +198,15 @@ func GetPluginFailedCondition(pluginKind PluginKindType) ConditionType { return ConditionType(fmt.Sprintf("%vFailed", pluginKind)) } -type Cache struct { - Name string `json:"name,omitempty"` - LocalPath string `json:"localPath,omitempty"` +// Returns the repo with the name and true if repo exists. +// nil and false otherwise. +func (c *KfConfig) GetRepoCache(repoName string) (Cache, bool) { + for _, r := range c.Status.Caches { + if r.Name == repoName { + return r, true + } + } + return Cache{}, false } func (c *KfConfig) GetPluginSpec(pluginKind PluginKindType, s interface{}) error { @@ -352,6 +386,203 @@ func (c *KfConfig) SetPluginFailed(pluginKind PluginKindType, msg string) { c.SetCondition(failedCond, v1.ConditionTrue, "", msg) } +// SyncCache will synchronize the local cache of any repositories. +// On success the status is updated with pointers to the cache. +// +// TODO(jlewi): I'm not sure this handles head references correctly. +// e.g. suppose we have a URI like +// https://github.com/kubeflow/manifests/tarball/pull/189/head?archive=tar.gz +// This gets unpacked to: kubeflow-manifests-e2c1bcb where e2c1bcb is the commit. +// I don't think the code is currently setting the local directory for the cache correctly in +// that case. +// +// +// Using tarball vs. archive in github links affects the download path +// e.g. +// https://github.com/kubeflow/manifests/tarball/master?archive=tar.gz +// unpacks to kubeflow-manifests-${COMMIT} +// https://github.com/kubeflow/manifests/archive/master.tar.gz +// unpacks to manifests-master +// Always use archive format so that the path is predetermined. +// +// Instructions: https://github.com/hashicorp/go-getter#protocol-specific-options +// +// What is the correct syntax for downloading pull requests? +// The following doesn't seem to work +// https://github.com/kubeflow/manifests/archive/master.tar.gz?ref=pull/188 +// * Appears to download master +// +// This appears to work +// https://github.com/kubeflow/manifests/tarball/pull/188/head?archive=tar.gz +// But unpacks it into +// kubeflow-manifests-${COMMIT} +// +func (c *KfConfig) SyncCache() error { + if c.Spec.AppDir == "" { + return fmt.Errorf("AppDir must be specified") + } + + appDir := c.Spec.AppDir + // Loop over all the repos and download them. + // TODO(https://github.com/kubeflow/kubeflow/issues/3545): We should check if we already have a local copy and + // not redownload it. + + baseCacheDir := path.Join(appDir, DefaultCacheDir) + if _, err := os.Stat(baseCacheDir); os.IsNotExist(err) { + log.Infof("Creating directory %v", baseCacheDir) + appdirErr := os.MkdirAll(baseCacheDir, os.ModePerm) + if appdirErr != nil { + log.Errorf("couldn't create directory %v Error %v", baseCacheDir, appdirErr) + return appdirErr + } + } + + for _, r := range c.Spec.Repos { + cacheDir := path.Join(baseCacheDir, r.Name) + + // Can we use a checksum or other mechanism to verify if the existing location is good? + // If there was a problem the first time around then removing it might provide a way to recover. + if _, err := os.Stat(cacheDir); err == nil { + // Check if the cache is up to date. + shouldSkip := false + for _, cache := range c.Status.Caches { + if cache.Name == r.Name && cache.LocalPath != "" { + shouldSkip = true + break + } + } + if shouldSkip { + log.Infof("%v exists; not resyncing ", cacheDir) + continue + } + + log.Infof("Deleting cachedir %v because Status.ReposCache is out of date", cacheDir) + + // TODO(jlewi): The reason the cachedir might exist but not be stored in KfDef.status + // is because of a backwards compatibility path in which we download the cache to construct + // the KfDef. Specifically coordinator.CreateKfDefFromOptions is calling kftypes.DownloadFromCache + // We don't want to rely on that method to set the cache because we have logic + // below to set LocalPath that we don't want to duplicate. + // Unfortunately this means we end up fetching the repo twice which is very inefficient. + if err := os.RemoveAll(cacheDir); err != nil { + log.Errorf("There was a problem deleting directory %v; error %v", cacheDir, err) + return errors.WithStack(err) + } + } + + u, err := url.Parse(r.URI) + + if err != nil { + log.Errorf("Could not parse URI %v; error %v", r.URI, err) + return errors.WithStack(err) + } + + log.Infof("Fetching %v to %v", r.URI, cacheDir) + tarballUrlErr := gogetter.GetAny(cacheDir, r.URI) + if tarballUrlErr != nil { + return &kfapis.KfError{ + Code: int(kfapis.INVALID_ARGUMENT), + Message: fmt.Sprintf("couldn't download URI %v Error %v", r.URI, tarballUrlErr), + } + } + + // This is a bit of a hack to deal with the fact that GitHub tarballs + // can unpack to a directory containing the commit. + localPath := cacheDir + if u.Scheme == "http" || u.Scheme == "https" { + files, filesErr := ioutil.ReadDir(cacheDir) + if filesErr != nil { + log.Errorf("Error reading cachedir; error %v", filesErr) + return errors.WithStack(filesErr) + } + subdir := files[0].Name() + localPath = path.Join(cacheDir, subdir) + } + + c.Status.Caches = append(c.Status.Caches, Cache{ + Name: r.Name, + LocalPath: localPath, + }) + + log.Infof("Fetch succeeded; LocalPath %v", localPath) + } + return nil +} + +// GetSecret returns the specified secret or an error if the secret isn't specified. +func (c *KfConfig) GetSecret(name string) (string, error) { + for _, s := range c.Spec.Secrets { + if s.Name != name { + continue + } + if s.SecretSource.LiteralSource != nil { + return s.SecretSource.LiteralSource.Value, nil + } + if s.SecretSource.HashedSource != nil { + return s.SecretSource.HashedSource.HashedValue, nil + } + if s.SecretSource.EnvSource != nil { + return os.Getenv(s.SecretSource.EnvSource.Name), nil + } + + return "", fmt.Errorf("No secret source provided for secret %v", name) + } + return "", NewSecretNotFound(name) +} + +// GetApplicationParameter gets the desired application parameter. +func (c *KfConfig) GetApplicationParameter(appName string, paramName string) (string, bool) { + // First we check applications for an application with the specified name. + if c.Spec.Applications != nil { + for _, a := range c.Spec.Applications { + if a.Name == appName { + return getParameter(a.KustomizeConfig.Parameters, paramName) + } + } + } + + return "", false +} + +// SetApplicationParameter sets the desired application parameter. +func (c *KfConfig) SetApplicationParameter(appName string, paramName string, value string) error { + // First we check applications for an application with the specified name. + if c.Spec.Applications != nil { + appIndex := -1 + for i, a := range c.Spec.Applications { + if a.Name == appName { + appIndex = i + } + } + + if appIndex >= 0 { + + if c.Spec.Applications[appIndex].KustomizeConfig == nil { + return errors.WithStack(fmt.Errorf("Application %v doesn't have KustomizeConfig", appName)) + } + + c.Spec.Applications[appIndex].KustomizeConfig.Parameters = setParameter( + c.Spec.Applications[appIndex].KustomizeConfig.Parameters, paramName, value) + + return nil + } + } + + return &AppNotFound{Name: appName} +} + +// SetSecret sets the specified secret; if a secret with the given name already exists it is overwritten. +func (c *KfConfig) SetSecret(newSecret Secret) { + for i, s := range c.Spec.Secrets { + if s.Name == newSecret.Name { + c.Spec.Secrets[i] = newSecret + return + } + } + + c.Spec.Secrets = append(c.Spec.Secrets, newSecret) +} + func IsPluginNotFound(e error) bool { if e == nil { return false @@ -368,3 +599,71 @@ func IsConditionNotFound(e error) bool { return ok && err.Code == int(kfapis.NOT_FOUND) && strings.HasPrefix(err.Message, conditionNotFoundErrPrefix) } + +type SecretNotFound struct { + Name string +} + +func (e *SecretNotFound) Error() string { + return fmt.Sprintf("Missing secret %v", e.Name) +} + +func NewSecretNotFound(n string) *SecretNotFound { + return &SecretNotFound{ + Name: n, + } +} + +func IsSecretNotFound(e error) bool { + if e == nil { + return false + } + _, ok := e.(*SecretNotFound) + return ok +} + +type AppNotFound struct { + Name string +} + +func (e *AppNotFound) Error() string { + return fmt.Sprintf("Application %v is missing", e.Name) +} + +func IsAppNotFound(e error) bool { + if e == nil { + return false + } + _, ok := e.(*AppNotFound) + return ok +} + +func getParameter(parameters []NameValue, paramName string) (string, bool) { + for _, p := range parameters { + if p.Name == paramName { + return p.Value, true + } + } + + return "", false +} + +func setParameter(parameters []NameValue, paramName string, value string) []NameValue { + pIndex := -1 + + for i, p := range parameters { + if p.Name == paramName { + pIndex = i + } + } + + if pIndex < 0 { + parameters = append(parameters, NameValue{}) + pIndex = len(parameters) - 1 + } + + parameters[pIndex].Name = paramName + parameters[pIndex].Value = value + + return parameters +} diff --git a/bootstrap/pkg/apis/apps/kfconfig/zz_generated.deepcopy.go b/bootstrap/pkg/apis/apps/kfconfig/zz_generated.deepcopy.go index 6cce1631641..4461dcf82bc 100644 --- a/bootstrap/pkg/apis/apps/kfconfig/zz_generated.deepcopy.go +++ b/bootstrap/pkg/apis/apps/kfconfig/zz_generated.deepcopy.go @@ -24,6 +24,22 @@ import ( 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 *AppNotFound) DeepCopyInto(out *AppNotFound) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppNotFound. +func (in *AppNotFound) DeepCopy() *AppNotFound { + if in == nil { + return nil + } + out := new(AppNotFound) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Application) DeepCopyInto(out *Application) { *out = *in @@ -95,6 +111,22 @@ func (in *EnvSource) DeepCopy() *EnvSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HashedSource) DeepCopyInto(out *HashedSource) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HashedSource. +func (in *HashedSource) DeepCopy() *HashedSource { + if in == nil { + return nil + } + out := new(HashedSource) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KfConfig) DeepCopyInto(out *KfConfig) { *out = *in @@ -302,6 +334,22 @@ func (in *Secret) DeepCopy() *Secret { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretNotFound) DeepCopyInto(out *SecretNotFound) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretNotFound. +func (in *SecretNotFound) DeepCopy() *SecretNotFound { + if in == nil { + return nil + } + out := new(SecretNotFound) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SecretRef) DeepCopyInto(out *SecretRef) { *out = *in @@ -326,6 +374,11 @@ func (in *SecretSource) DeepCopyInto(out *SecretSource) { *out = new(LiteralSource) **out = **in } + if in.HashedSource != nil { + in, out := &in.HashedSource, &out.HashedSource + *out = new(HashedSource) + **out = **in + } if in.EnvSource != nil { in, out := &in.EnvSource, &out.EnvSource *out = new(EnvSource)