-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solution #29
base: main
Are you sure you want to change the base?
solution #29
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
kind: ServiceAccount | ||
apiVersion: v1 | ||
metadata: | ||
name: secrets-reader | ||
namespace: todoapp | ||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
namespace: todoapp # This is the namespace where the role will be created | ||
name: secrets-lister-role # This is the name of the role | ||
rules: | ||
- apiGroups: [""] # "" indicates the core API group, which includes all core APIs | ||
resources: ["pods", "secrets"] # Indicates the resources that the role can access, in this case, pods | ||
verbs: ["list", "get", "watch"] # Indicates the actions that the role can perform on the resources | ||
|
||
--- | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: secrets-lister-role-binding | ||
namespace: todoapp | ||
subjects: | ||
- kind: ServiceAccount # this can also be "Group" or "ServiceAccount". | ||
name: secrets-reader # name of the user, group or service account. | ||
apiGroup: rbac.authorization.k8s.io # this is always "rbac.authorization.k8s.io". | ||
Comment on lines
+26
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
roleRef: | ||
kind: Role # this must be Role or ClusterRole. | ||
name: secrets-lister-role # name of the Role or ClusterRole to bind. | ||
apiGroup: rbac.authorization.k8s.io # this is always "rbac.authorization.k8s.io" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extensions.closeExtensionDetailsOnViewChange": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ kubectl apply -f .infrastructure/app/clusterIp.yml | |
kubectl apply -f .infrastructure/app/nodeport.yml | ||
kubectl apply -f .infrastructure/app/hpa.yml | ||
kubectl apply -f .infrastructure/app/deployment.yml | ||
|
||
kubectl apply -f .infrastructure/security/rbac.yml | ||
# Install Ingress Controller | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml | ||
# kubectl apply -f .infrastructure/ingress/ingress.yml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The line for applying the ingress configuration is commented out. If the ingress is needed for your application, ensure to uncomment this line. Otherwise, if it's intentional, you can leave it as is. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
resources
field includespods
, which might not be necessary if the intention is only to list and getsecrets
. Ensure thatpods
is intentionally included here.