Skip to content

Commit

Permalink
update faqs
Browse files Browse the repository at this point in the history
  • Loading branch information
MuneebAijaz committed Dec 5, 2023
1 parent 8f4fe2e commit db2b8c3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
29 changes: 27 additions & 2 deletions content/faq.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
# FAQs

## Q. Error received while performing Create, Update or Delete action on namespace `"Cannot CREATE namespace test-john without label stakater.com/tenant"`
## Namespace Admission Webhook

### Q. Error received while performing Create, Update or Delete action on namespace : `"Cannot CREATE namespace test-john without label stakater.com/tenant"`

**A.** Error occurs when a user is trying to perform create, update, delete action on a namespace without the required `stakater.com/tenant` label. This label is used by the operator to see that authorized users can perform that action on the namespace. Just add the label with the tenant name so that MTO knows which tenant the namespace belongs to, and who is authorized to perform create/update/delete operations. For more details please refer to [Namespace use-case](./tutorials/tenant/creating-namespaces.md).

## Q. How do I deploy cluster-scoped resource via the ArgoCD integration?
### Q. Error received while performing Create, Update or Delete action on Openshift Project : `Cannot CREATE namespace testing without label stakater.com/tenant. User: system:serviceaccount:openshift-apiserver:openshift-apiserver-sa`

Check failure on line 9 in content/faq.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/faq.md#L9

[Vale.Terms] Use 'OpenShift' instead of 'Openshift'.
Raw output
{"message": "[Vale.Terms] Use 'OpenShift' instead of 'Openshift'.", "location": {"path": "content/faq.md", "range": {"start": {"line": 9, "column": 75}}}, "severity": "ERROR"}


Check failure on line 11 in content/faq.md

View workflow job for this annotation

GitHub Actions / doc_qa / markdown_lint

Multiple consecutive blank lines [Expected: 1; Actual: 2]

Check failure on line 12 in content/faq.md

View workflow job for this annotation

GitHub Actions / doc_qa / markdown_lint

Multiple consecutive blank lines [Expected: 1; Actual: 3]
**A.** This error occurs because we dont allow Tenant members to do operations on Openshift Project, whenever an operation is done on a project, `openshift-apiserver-sa` tries to do the same request onto a namespace. Thats why the user sees `openshift-apiserver-sa` Service Account instead of its own user in the error message.

Check failure on line 13 in content/faq.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/faq.md#L13

[Vale.Spelling] Did you really mean 'dont'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'dont'?", "location": {"path": "content/faq.md", "range": {"start": {"line": 13, "column": 37}}}, "severity": "ERROR"}

Check failure on line 13 in content/faq.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/faq.md#L13

[Vale.Terms] Use 'OpenShift' instead of 'Openshift'.
Raw output
{"message": "[Vale.Terms] Use 'OpenShift' instead of 'Openshift'.", "location": {"path": "content/faq.md", "range": {"start": {"line": 13, "column": 83}}}, "severity": "ERROR"}

Check failure on line 13 in content/faq.md

View workflow job for this annotation

GitHub Actions / vale

[vale] content/faq.md#L13

[Vale.Spelling] Did you really mean 'Thats'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'Thats'?", "location": {"path": "content/faq.md", "range": {"start": {"line": 13, "column": 218}}}, "severity": "ERROR"}

The fix is to try the same operation on the namespace manifest instead.

### Q. Error received while doing "kubectl apply -f namespace.yaml"

```terminal
Error from server (Forbidden): error when retrieving current configuration of:
Resource: "/v1, Resource=namespaces", GroupVersionKind: "/v1, Kind=Namespace"
Name: "ns1", Namespace: ""
from server for: "namespace.yaml": namespaces "ns1" is forbidden: User "muneeb" cannot get resource "namespaces" in API group "" in the namespace "ns1"
```

**Answer.** Tenant members will not be able to use `kubectl apply` because `apply` first gets all the instances of that resource, in this case namespaces, and then does the required operation on the selected resource. To maintain tenancy, tenant members do not the access to get or list all the namespaces.

The fix is create namespaces with `kubectl create` instead.

## MTO - ArgoCD Integration

### Q. How do I deploy cluster-scoped resource via the ArgoCD integration?

**A.** Multi-Tenant Operator's ArgoCD Integration allows configuration of which cluster-scoped resources can be deployed, both globally and on a per-tenant basis. For a global allow-list that applies to all tenants, you can add both resource `group` and `kind` to the [IntegrationConfig's](./how-to-guides/integration-config.md#argocd) `spec.argocd.clusterResourceWhitelist` field. Alternatively, you can set this up on a tenant level by configuring the same details within a [Tenant's](./how-to-guides/tenant.md) `spec.argocd.appProject.clusterResourceWhitelist` field. For more details, check out the [ArgoCD integration use cases](./tutorials/argocd/enabling-multi-tenancy-argocd.md#allow-argocd-to-sync-certain-cluster-wide-resources)

Expand Down
2 changes: 1 addition & 1 deletion content/integration-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ users:
`clusterAdminGroups:` Contains names of the groups that are allowed to perform CRUD operations on namespaces present on the cluster. Users in the specified group(s) will be able to perform these operations without MTO getting in their way

!!! note
User `kube:admin` is bypassed by default to perform operations as a cluster admin, this includes operations on all of the namespaces.
User `kube:admin` is bypassed by default to perform operations as a cluster admin, this includes operations on all the namespaces.

### Privileged Namespaces

Expand Down

0 comments on commit db2b8c3

Please sign in to comment.