Skip to content

Commit

Permalink
feat: upgrade admission apiversion to v1 (#697)
Browse files Browse the repository at this point in the history
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
  • Loading branch information
tao12345666333 committed Sep 29, 2021
1 parent 0630ac5 commit 736aba3
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -71,7 +71,7 @@ unit-test:
### e2e-test: Run e2e test cases (kind is required)
.PHONY: e2e-test
e2e-test: ginkgo-check push-images-to-kind
kubectl apply -k $(PWD)/samples/deploy/crd/v1
kubectl apply -k $(PWD)/samples/deploy/crd
cd test/e2e && ginkgo -cover -coverprofile=coverage.txt -r --randomizeSuites --randomizeAllSpecs --trace -p --nodes=$(E2E_CONCURRENCY)

.PHONY: ginkgo-check
Expand Down
2 changes: 1 addition & 1 deletion docs/en/latest/practices/the-hard-way.md
Expand Up @@ -602,7 +602,7 @@ subjects:
Then, we need to create ApisixRoute CRD:

```bash
kubectl apply -k samples/deploy/crd/v1
kubectl apply -k samples/deploy/crd
```

Please refer to [samples](http://github.com/apache/apisix-ingress-controller/blob/master/samples/deploy/crd) for details.
Expand Down
4 changes: 3 additions & 1 deletion samples/deploy/admission/webhook-registration.yaml
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

apiVersion: admissionregistration.k8s.io/v1beta1
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: apisix-validations
Expand All @@ -38,3 +38,5 @@ webhooks:
resources: ["apisixroutes"]
timeoutSeconds: 30
failurePolicy: Ignore
sideEffects: None
admissionReviewVersions: ["v1", "v1beta1"]
24 changes: 24 additions & 0 deletions samples/deploy/crd/kustomization.yaml
@@ -0,0 +1,24 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
# See the License for the specific language governing permissions and
# limitations under the License.
#

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: ingress-apisix
commonLabels:
apisix.apache.org/app: ingress-apisix
bases:
- ./v1
2 changes: 1 addition & 1 deletion samples/deploy/kustomization.yaml
Expand Up @@ -25,4 +25,4 @@ bases:
- ./admission
- ./deployment
- ./rbac
- ./crd/v1
- ./crd

0 comments on commit 736aba3

Please sign in to comment.