Skip to content

Commit

Permalink
Merge pull request #4101 from camilamacedo86/fix-deploy-image-sample-ls
Browse files Browse the repository at this point in the history
🐛 (deploy-image/v1-alpha1): Fix sample by ensuring the right labels
  • Loading branch information
k8s-ci-robot authored Aug 25, 2024
2 parents 6faf882 + 6a17411 commit fe882c9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apiVersion: cache.example.com/v1alpha1
kind: Memcached
metadata:
labels:
app.kubernetes.io/name: project
app.kubernetes.io/managed-by: kustomize
name: memcached-sample
spec:
# TODO(user): edit the following value to ensure the number
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/*
Copyright 2022 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -27,6 +30,7 @@ var _ machinery.Template = &CRDSample{}
type CRDSample struct {
machinery.TemplateMixin
machinery.ResourceMixin
machinery.ProjectNameMixin

// Port if informed we will create the scaffold with this spec
Port string
Expand Down Expand Up @@ -54,6 +58,9 @@ func (f *CRDSample) SetTemplateDefaults() error {
const crdSampleTemplate = `apiVersion: {{ .Resource.QualifiedGroup }}/{{ .Resource.Version }}
kind: {{ .Resource.Kind }}
metadata:
labels:
app.kubernetes.io/name: {{ .ProjectName }}
app.kubernetes.io/managed-by: kustomize
name: {{ lower .Resource.Kind }}-sample
spec:
# TODO(user): edit the following value to ensure the number
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apiVersion: example.com.testproject.org/v1alpha1
kind: Busybox
metadata:
labels:
app.kubernetes.io/name: project-v4-with-deploy-image
app.kubernetes.io/managed-by: kustomize
name: busybox-sample
spec:
# TODO(user): edit the following value to ensure the number
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apiVersion: example.com.testproject.org/v1alpha1
kind: Memcached
metadata:
labels:
app.kubernetes.io/name: project-v4-with-deploy-image
app.kubernetes.io/managed-by: kustomize
name: memcached-sample
spec:
# TODO(user): edit the following value to ensure the number
Expand Down

0 comments on commit fe882c9

Please sign in to comment.