Skip to content

Commit

Permalink
improve yurtstaticset template metadata (#1591)
Browse files Browse the repository at this point in the history
(cherry picked from commit 87772d9)

Co-authored-by: JameKeal <[email protected]>
  • Loading branch information
github-actions[bot] and JameKeal authored Jul 7, 2023
1 parent 1896468 commit 609469f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions charts/yurthub/templates/yurthub-cloud-yurtstaticset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ spec:
metadata:
labels:
k8s-app: yurt-hub-cloud
name: yurt-hub-cloud
namespace: {{ .Release.Namespace }}
spec:
volumes:
- name: hub-dir
Expand Down
2 changes: 0 additions & 2 deletions charts/yurthub/templates/yurthub-yurtstaticset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ spec:
metadata:
labels:
k8s-app: yurt-hub
name: yurt-hub
namespace: {{ .Release.Namespace }}
spec:
volumes:
- name: hub-dir
Expand Down
4 changes: 4 additions & 0 deletions pkg/apis/apps/v1alpha1/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ func SetDefaultsYurtStaticSet(obj *YurtStaticSet) {
if podSpec != nil {
SetDefaultPodSpec(podSpec)
}

// use YurtStaticSet name and namespace to replace name and namespace in template metadata
obj.Spec.Template.Name = obj.Name
obj.Spec.Template.Namespace = obj.Namespace
}

// SetDefaultsYurtAppDaemon set default values for YurtAppDaemon.
Expand Down

0 comments on commit 609469f

Please sign in to comment.