Skip to content

Commit 25ccbb6

Browse files
authored
Update tutorials wrt APIRule v1beta1 depreciation (#1550)
1 parent b33397f commit 25ccbb6

File tree

2 files changed

+19
-26
lines changed

2 files changed

+19
-26
lines changed

Diff for: docs/user/tutorials/01-140-use-secret-mounts.md

+9-13
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,23 @@ Follow these steps:
6868
6969
```bash
7070
cat <<EOF | kubectl apply -f -
71-
apiVersion: gateway.kyma-project.io/v1beta1
71+
apiVersion: gateway.kyma-project.io/v2
7272
kind: APIRule
7373
metadata:
7474
name: $FUNCTION_NAME
7575
namespace: $NAMESPACE
7676
spec:
77-
gateway: kyma-system/kyma-gateway
78-
host: $FUNCTION_NAME.$DOMAIN
79-
rules:
80-
- path: /.*
81-
accessStrategies:
82-
- config: {}
83-
handler: noop
84-
methods:
85-
- GET
86-
- POST
87-
- PUT
88-
- DELETE
77+
hosts:
78+
- $FUNCTION_NAME
8979
service:
9080
name: $FUNCTION_NAME
81+
namespace: $NAMESPACE
9182
port: 80
83+
gateway: kyma-system/kyma-gateway
84+
rules:
85+
- path: /*
86+
methods: ["GET", "POST", "PUT", "DELETE"]
87+
noAuth: true
9288
EOF
9389
```
9490

Diff for: docs/user/tutorials/01-20-expose-function.md

+10-13
Original file line numberDiff line numberDiff line change
@@ -82,33 +82,30 @@ You can expose a Function using Kyma dashboard, Kyma CLI, or kubectl:
8282

8383
```bash
8484
cat <<EOF | kubectl apply -f -
85-
apiVersion: gateway.kyma-project.io/v1beta1
85+
apiVersion: gateway.kyma-project.io/v2
8686
kind: APIRule
8787
metadata:
8888
name: $NAME
8989
namespace: $NAMESPACE
9090
spec:
91-
gateway: kyma-system/kyma-gateway
92-
host: $NAME.$DOMAIN
91+
hosts:
92+
- $NAME
9393
service:
9494
name: $NAME
95+
namespace: $NAMESPACE
9596
port: 80
97+
gateway: kyma-system/kyma-gateway
9698
rules:
97-
- path: /.*
98-
methods:
99-
- GET
100-
- POST
101-
- PUT
102-
- DELETE
103-
accessStrategies:
104-
- handler: no_auth
99+
- path: /*
100+
methods: ["GET", "POST", "PUT", "DELETE"]
101+
noAuth: true
105102
EOF
106103
```
107104
108-
5. Check that the APIRule was created successfully and has the status `OK`:
105+
5. Check that the APIRule was created successfully and has the status `Ready`:
109106
110107
```bash
111-
kubectl get apirules $NAME -n $NAMESPACE -o=jsonpath='{.status.APIRuleStatus.code}'
108+
kubectl get apirules $NAME -n $NAMESPACE -o=jsonpath='{.status.state}'
112109
```
113110
114111
6. Access the Function's external address:

0 commit comments

Comments
 (0)