Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.

Commit b3f1f84

Browse files
authored
Merge pull request #14 from ashish493/master
feat: Add support for all resources of k8s and for production server
2 parents af051f5 + 75dc93d commit b3f1f84

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

.releaserc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"debug": true,
3+
"branches": [
4+
"+([0-9])?(.{+([0-9]),x}).x",
5+
"master",
6+
{
7+
"name": "beta",
8+
"prerelease": true
9+
}
10+
],
11+
"plugins": [
12+
"@semantic-release/commit-analyzer",
13+
"@semantic-release/release-notes-generator",
14+
"@semantic-release/github"
15+
]
16+
}

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ Before proceeding, make sure to have the following-
4444
```
4545
kubectl apply -f deployment.yaml
4646
```
47+
- For a production server, we need to create a k8s `secret` to place the certificates for security purposes.
48+
```
49+
kubectl create secret generic casbin -n default \
50+
--from-file=key.pem=certs/casbin-key.pem \
51+
--from-file=cert.pem=certs/casbin-crt.pem
52+
```
53+
- Once, this part is done we need to change the directory of the certs in [main.go](https://github.com/ashish493/k8s-authz/blob/3560551427c0431a9d4594ad1206f084ede37c49/main.go#L26) and then in [manifests](https://github.com/ashish493/k8s-authz/blob/3560551427c0431a9d4594ad1206f084ede37c49/manifests/deployment.yaml#L22) with that of the `secret`.
54+
4755
Now the server should be running and ready to validate the requests for the operations on the pods.
4856

4957
## Documentation

manifests/deployment.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ webhooks:
6060
path: "/validate"
6161
caBundle: "${CA_BUNDLE}"
6262
rules:
63-
- operations: ["CREATE","UPDATE","DELETE","CONNECT"]
63+
- operations: ["*"]
6464
apiGroups: [""]
6565
apiVersions: ["v1"]
66-
resources: ["pods"]
66+
resources: ["*/*"]
6767
failurePolicy: Fail

0 commit comments

Comments
 (0)