File tree Expand file tree Collapse file tree 12 files changed +247076
-12
lines changed Expand file tree Collapse file tree 12 files changed +247076
-12
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ push/%:
47
47
.PHONY : deploy
48
48
deploy : crd
49
49
$(KUBECTL ) apply --server-side=true -f $(ROOT ) /manifests/crd
50
- $(KUBECTL ) apply --server-side=true -f $(ROOT ) /manifests/rbac
51
50
$(KUBECTL ) apply --server-side=true -f $(ROOT ) /manifests/deploy
52
51
53
52
.PHONY : codegen
@@ -79,15 +78,15 @@ overlaygen: bin/overlay-gen
79
78
--go-header-file=$(BOILERPLATE_FILE ) \
80
79
k8s.io/api/core/v1
81
80
81
+ .PHONY : yamlgen
82
+ yamlgen : crd
83
+ $(ROOT ) /hack/yaml.sh
84
+
82
85
.PHONY : crd
83
86
crd : bin/controller-gen build/crd-modifier
84
87
$(CONTROLLER_GEN ) crd:generateEmbeddedObjectMeta=true output:crd:artifacts:config=$(ROOT ) /manifests/crd paths=$(API_PATH ) /...
85
88
$(BIN_DIR ) /crd-modifier -dir $(ROOT ) /manifests/crd
86
89
87
- # Deprecate this generator, rbac generator cannot well handle nonResourceURLs
88
- .PHONY : rbac
89
- rbac : bin/controller-gen
90
- $(CONTROLLER_GEN ) rbac:roleName=tidb-operator output:rbac:artifacts:config=$(ROOT ) /manifests/rbac paths=$(API_PATH ) /...
91
90
92
91
.PHONY : tidy
93
92
tidy :
@@ -103,7 +102,7 @@ gengo: bin/mockgen
103
102
license : bin/license-eye
104
103
$(LICENSE_EYE ) -c .github/licenserc.yaml header fix
105
104
106
- ALL_GEN = tidy codegen crd gengo overlaygen
105
+ ALL_GEN = tidy codegen crd gengo overlaygen yamlgen
107
106
.PHONY : generate
108
107
generate : $(ALL_GEN ) license
109
108
Original file line number Diff line number Diff line change @@ -64,11 +64,6 @@ function e2e::install_crds() {
64
64
$KUBECTL apply --server-side=true -f $ROOT /manifests/crd
65
65
}
66
66
67
- function e2e::install_rbac() {
68
- echo " installing RBAC..."
69
- $KUBECTL -n $V_DEPLOY_NAMESPACE apply --server-side=true -f $ROOT /manifests/rbac
70
- }
71
-
72
67
function e2e::install_operator() {
73
68
echo " installing operator..."
74
69
$KUBECTL -n $V_DEPLOY_NAMESPACE apply --server-side=true -f $ROOT /manifests/deploy
@@ -126,7 +121,6 @@ function e2e::prepare() {
126
121
e2e::ensure_cert_manager
127
122
128
123
e2e::install_crds
129
- e2e::install_rbac
130
124
131
125
# build the operator image and load it into the kind cluster
132
126
image::build prestop-checker operator testing-workload backup-manager --push
Original file line number Diff line number Diff line change @@ -23,6 +23,10 @@ set -o pipefail
23
23
24
24
ROOT= $( cd $( dirname " ${BASH_SOURCE[0]} " ) /../..; pwd -P)
25
25
26
+ # Set LC_ALL to avoid sort issue
27
+ # See https://www.gnu.org/software/coreutils/manual/html_node/ls-invocation.html#ls-invocation
28
+ readonly LC_ALL= C
29
+
26
30
# ---
27
31
# Global variables definitions.
28
32
# All variables should be in format V_XXX
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Copyright 2024 PingCAP, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+
17
+ set -o errexit
18
+ set -o nounset
19
+ set -o pipefail
20
+
21
+ ROOT=$( cd $( dirname " ${BASH_SOURCE[0]} " ) /..; pwd -P)
22
+ source $ROOT /hack/lib/vars.sh
23
+
24
+ OPERATOR=$ROOT /manifests/tidb-operator.yaml
25
+ CRDS=$ROOT /manifests/tidb-operator.crds.yaml
26
+
27
+ echo -n > $CRDS
28
+ echo -n > $OPERATOR
29
+ for f in $ROOT /manifests/crd/* .yaml; do
30
+ echo " append $f "
31
+ cat $f >> $CRDS
32
+ cat $f >> $OPERATOR
33
+ done
34
+
35
+ for f in $ROOT /manifests/deploy/* .yaml; do
36
+ echo " append $f "
37
+ cat $f >> $OPERATOR
38
+ done
Original file line number Diff line number Diff line change
1
+ ---
1
2
apiVersion : v1
2
3
kind : Namespace
3
4
metadata :
Original file line number Diff line number Diff line change
1
+ ---
1
2
apiVersion : v1
2
3
kind : ServiceAccount
3
4
metadata :
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ ---
1
2
apiVersion : rbac.authorization.k8s.io/v1
2
3
kind : ClusterRoleBinding
3
4
metadata :
Original file line number Diff line number Diff line change
1
+ ---
1
2
# This policy is defined to avoid unexpected deletion of tikv pods.
2
3
# We cannot change grace period after it has been set because of this issue
3
4
# https://github.com/kubernetes/kubernetes/issues/83916.
Original file line number Diff line number Diff line change
1
+ ---
1
2
apiVersion : apps/v1
2
3
kind : Deployment
3
4
metadata :
You can’t perform that action at this time.
0 commit comments