Skip to content

Commit

Permalink
Fix CRD Annotation generation for all platforms (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
HoustonPutman committed Mar 15, 2022
1 parent 8207f95 commit 7246b4d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion config/crd/bases/solr.apache.org_solrbackups.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
operator.solr.apache.org/version: v0.5.1-prerelease
argocd.argoproj.io/sync-options: Replace=true
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: solrbackups.solr.apache.org
spec:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/solr.apache.org_solrclouds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
operator.solr.apache.org/version: v0.5.1-prerelease
argocd.argoproj.io/sync-options: Replace=true
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: solrclouds.solr.apache.org
spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
operator.solr.apache.org/version: v0.5.1-prerelease
argocd.argoproj.io/sync-options: Replace=true
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: solrprometheusexporters.solr.apache.org
spec:
Expand Down
4 changes: 1 addition & 3 deletions hack/config/add_crds_annotations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ files=("${CONFIG_DIRECTORY:-config}"/crd/bases/*)
# Copy and package CRDs
for file in "${files[@]}"; do
{
cat "${file}" | sed -e "/^ controller-gen.kubebuilder.io.version.*/a \\
operator.solr.apache.org\\/version: ${VERSION}\\
argocd.argoproj.io\\/sync-options: Replace=true"
awk '/^ controller-gen.kubebuilder.io.version.*/{print " operator.solr.apache.org/version: '"${VERSION}"'\n argocd.argoproj.io/sync-options: Replace=true"}1' "${file}"
} > "${file}.tmp" && mv "${file}.tmp" "${file}"
done
6 changes: 3 additions & 3 deletions helm/solr-operator/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
operator.solr.apache.org/version: v0.5.1-prerelease
argocd.argoproj.io/sync-options: Replace=true
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: solrbackups.solr.apache.org
spec:
Expand Down Expand Up @@ -1273,9 +1273,9 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
operator.solr.apache.org/version: v0.5.1-prerelease
argocd.argoproj.io/sync-options: Replace=true
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: solrclouds.solr.apache.org
spec:
Expand Down Expand Up @@ -8336,9 +8336,9 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.5.0
operator.solr.apache.org/version: v0.5.1-prerelease
argocd.argoproj.io/sync-options: Replace=true
controller-gen.kubebuilder.io/version: v0.5.0
creationTimestamp: null
name: solrprometheusexporters.solr.apache.org
spec:
Expand Down

0 comments on commit 7246b4d

Please sign in to comment.