Skip to content

Commit

Permalink
bugfix: fix jindoruntime name cannot contain jindofs (fluid-cloudnati…
Browse files Browse the repository at this point in the history
…ve#4202)

* bugfix: JindoRuntime cannot use a name containing "jindofs"

Signed-off-by: trafalgarzzz <[email protected]>

* todo: add todo for handling fullnameOverride

Signed-off-by: trafalgarzzz <[email protected]>

---------

Signed-off-by: trafalgarzzz <[email protected]>
Signed-off-by: cheyang <[email protected]>
  • Loading branch information
TrafalgarZZZ authored and cheyang committed Jul 16, 2024
1 parent 4c497d3 commit cd6570e
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/ddc/alluxio/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (e *AlluxioEngine) transform(runtime *datav1alpha1.AlluxioRuntime) (value *
Owner: transformer.GenerateOwnerReferenceFromObject(runtime),
}

// TODO: Handle cases that FullnameOverride is too long (> 63 chars)
value.FullnameOverride = e.name

// 1.transform the common part
Expand Down
1 change: 1 addition & 0 deletions pkg/ddc/efc/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (e *EFCEngine) transform(runtime *datav1alpha1.EFCRuntime) (value *EFC, err
},
}

// TODO: Handle cases that FullnameOverride is too long (> 63 chars)
value.FullnameOverride = e.name

err = e.transformMasters(runtime, dataset, value)
Expand Down
1 change: 1 addition & 0 deletions pkg/ddc/goosefs/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func (e *GooseFSEngine) transform(runtime *datav1alpha1.GooseFSRuntime) (value *

value = &GooseFS{}

// TODO: Handle cases that FullnameOverride is too long (> 63 chars)
value.FullnameOverride = e.name

// 1.transform the common part
Expand Down
3 changes: 3 additions & 0 deletions pkg/ddc/jindocache/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ func (e *JindoCacheEngine) transform(runtime *datav1alpha1.JindoRuntime) (value
}

value = &Jindo{
// TODO: Handle cases that FullnameOverride is too long (> 63 chars)
// TODO: refactor names of jindoruntime and make it aligned with other runtimes
FullnameOverride: fmt.Sprintf("%s-%s", e.name, common.JindoChartName),
Image: smartdataConfig.image,
ImageTag: smartdataConfig.imageTag,
ImagePullPolicy: smartdataConfig.imagePullPolicy,
Expand Down
1 change: 1 addition & 0 deletions pkg/ddc/jindocache/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
)

type Jindo struct {
FullnameOverride string `json:"fullnameOverride"`
Image string `json:"image"`
ImageTag string `json:"imageTag"`
ImagePullPolicy string `json:"imagePullPolicy"`
Expand Down
3 changes: 3 additions & 0 deletions pkg/ddc/jindofsx/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ func (e *JindoFSxEngine) transform(runtime *datav1alpha1.JindoRuntime) (value *J
}

value = &Jindo{
// TODO: Handle cases that FullnameOverride is too long (> 63 chars)
// TODO: refactor names of jindoruntime and make it aligned with other runtimes
FullnameOverride: fmt.Sprintf("%s-%s", e.name, common.JindoChartName),
Image: smartdataConfig.image,
ImageTag: smartdataConfig.imageTag,
ImagePullPolicy: smartdataConfig.imagePullPolicy,
Expand Down
1 change: 1 addition & 0 deletions pkg/ddc/jindofsx/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
)

type Jindo struct {
FullnameOverride string `json:"fullnameOverride"`
Image string `json:"image"`
ImageTag string `json:"imageTag"`
ImagePullPolicy string `json:"imagePullPolicy"`
Expand Down
1 change: 1 addition & 0 deletions pkg/ddc/juicefs/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func (j *JuiceFSEngine) transform(runtime *datav1alpha1.JuiceFSRuntime) (value *
},
}

// TODO: Handle cases that FullnameOverride is too long (> 63 chars)
value.FullnameOverride = j.name
value.Owner = transformer.GenerateOwnerReferenceFromObject(runtime)

Expand Down
1 change: 1 addition & 0 deletions pkg/ddc/thin/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func (t *ThinEngine) transform(runtime *datav1alpha1.ThinRuntime, profile *datav
},
}

// TODO: Handle cases that FullnameOverride is too long (> 63 chars)
value.FullnameOverride = t.name
value.Owner = transformer.GenerateOwnerReferenceFromObject(runtime)
toRuntimeSetConfig, err := t.toRuntimeSetConfig(nil, nil)
Expand Down
1 change: 1 addition & 0 deletions pkg/ddc/vineyard/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func (e *VineyardEngine) transform(runtime *datav1alpha1.VineyardRuntime) (value
value = &Vineyard{
Owner: transformer.GenerateOwnerReferenceFromObject(runtime),
}
// TODO: Handle cases that FullnameOverride is too long (> 63 chars)
value.FullnameOverride = e.name

value.TieredStore, err = e.transformTieredStore(runtime)
Expand Down

0 comments on commit cd6570e

Please sign in to comment.