Skip to content

Commit

Permalink
improve yurtstaticset template metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
JameKeal committed Jun 5, 2023
1 parent b3ae2c7 commit 87772d9
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 87772d9

Please sign in to comment.