@@ -83,15 +83,17 @@ createnamespaces:
83
83
deletenamespaces :
84
84
$(PGO_KUBE_CLIENT ) delete -k ./config/namespace
85
85
86
- # Install the postgrescluster CRD
87
- # Note: using `--server-side --force-conflicts` when applying the K8s objects in order to
86
+ # Note: For 'install', 'deploy' and 'deploy-dev' below
87
+ # Using `--server-side --force-conflicts` when applying the K8s objects in order to
88
88
# A) remove the `kubectl.kubernetes.io/last-applied-configuration` from the CRD since it
89
89
# was violating the limit on size of `metadata.annotations`
90
90
# - https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go#L36
91
91
# B) overriding conflicts around managed fields during subsequent applies;
92
92
# the fields that were erroring in a local k3s cluster were `.status.conditions`,
93
93
# `.status.acceptedNames.kind`, and `.status.acceptedNames.plural`, which were managed by
94
94
# `k3s` rather than by `kubectl`
95
+
96
+ # Install the postgrescluster CRD
95
97
install :
96
98
$(PGO_KUBE_CLIENT ) apply --server-side --force-conflicts -k ./config/crd
97
99
@@ -101,17 +103,9 @@ uninstall:
101
103
102
104
# Deploy the PostgreSQL Operator (enables the postgrescluster controller)
103
105
deploy :
104
- $(PGO_KUBE_CLIENT ) apply -k ./config/default
106
+ $(PGO_KUBE_CLIENT ) apply --server-side --force-conflicts - k ./config/default
105
107
106
108
# Deploy the PostgreSQL Operator locally
107
- # Note: using `--server-side --force-conflicts` when applying the K8s objects in order to
108
- # A) remove the `kubectl.kubernetes.io/last-applied-configuration` from the CRD since it
109
- # was violating the limit on size of `metadata.annotations`
110
- # - https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/validation/objectmeta.go#L36
111
- # B) overriding conflicts around managed fields during subsequent applies;
112
- # the fields that were erroring in a local k3s cluster were `.status.conditions`,
113
- # `.status.acceptedNames.kind`, and `.status.acceptedNames.plural`, which were managed by
114
- # `k3s` rather than by `kubectl`
115
109
deploy-dev : build-postgres-operator createnamespaces
116
110
$(PGO_KUBE_CLIENT ) apply --server-side --force-conflicts -k ./config/dev
117
111
hack/create-kubeconfig.sh postgres-operator pgo
0 commit comments