Skip to content

Commit 979e3c4

Browse files
author
Vivek Reddy
committed
review comments
1 parent 750b6f6 commit 979e3c4

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

docs/AppFramework.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Create a role and role-binding for the splunk-operator service account. This all
3333
### Credentials via Kubernetes Secret or Workload Identity:
3434
Configure credentials through either a Kubernetes secret (e.g., storing a GCP service account key in key.json) or use Workload Identity for secure access:
3535

36-
* Kubernetes Secret: Create a Kubernetes secret using the service account JSON key file for GCP access.
37-
* Workload Identity: Use Workload Identity to associate the Kubernetes service account used by the Splunk Operator with a GCP service account that has the Storage Object Viewer IAM role for the required bucket.
36+
* **Kubernetes Secret**: Create a Kubernetes secret using the service account JSON key file for GCP access.
37+
* **Workload Identity**: Use Workload Identity to associate the Kubernetes service account used by the Splunk Operator with a GCP service account that has the Storage Object Viewer IAM role for the required bucket.
3838

39-
Example for creating the secret
39+
## Example for creating the secret
4040

4141
```shell
4242
kubectl create secret generic gcs-secret --from-file=key.json=path/to/your-service-account-key.json
@@ -141,7 +141,7 @@ spec:
141141
secretRef: azureblob-secret
142142
```
143143
144-
example using GCP blob: Standalone.yaml
144+
Example using GCP blob: Standalone.yaml
145145
146146
```yaml
147147
apiVersion: enterprise.splunk.com/v4
@@ -845,9 +845,9 @@ Azure Managed Identities can be used to provide IAM access to the blobs. With ma
845845

846846
### **Azure Blob Authorization Recommendations:**
847847

848-
- **Granular Access:** Azure allows "Managed Identities" assignment at the "storage accounts" level as well as at specific containers (buckets) levels. A managed identity assigned read permissions at a storage account level will have read access for all containers within that storage account. As a good security practice, assign the managed identity to only the specific containers it needs to access, rather than the entire storage account.
848+
- **Granular Access:** Azure allows **"Managed Identities"** assignment at the **"storage accounts"** level as well as at specific containers (buckets) levels. A managed identity assigned read permissions at a storage account level will have read access for all containers within that storage account. As a good security practice, assign the managed identity to only the specific containers it needs to access, rather than the entire storage account.
849849

850-
- **Avoid Shared Access Keys:** In contrast to "Managed Identities", Azure allows "shared access keys" configurable only at the storage accounts level. When using the `secretRef` configuration in the CRD, the underlying secret key will allow both read and write access to the storage account (and all containers within it). Based on your security needs, consider using "Managed Identities" instead of secrets. Additionally, there's no automated way to rotate the secret key, so if you're using these keys, rotate them regularly (e.g., every 90 days).
850+
- **Avoid Shared Access Keys:** In contrast to **"Managed Identities"**, Azure allows **"shared access keys"** configurable only at the storage accounts level. When using the `secretRef` configuration in the CRD, the underlying secret key will allow both read and write access to the storage account (and all containers within it). Based on your security needs, consider using "Managed Identities" instead of secrets. Additionally, there's no automated way to rotate the secret key, so if you're using these keys, rotate them regularly (e.g., every 90 days).
851851

852852
---
853853

pkg/splunk/enterprise/searchheadcluster.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,6 @@ var newSearchHeadClusterPodManager = func(client splcommon.ControllerClient, log
272272

273273
// ApplyShcSecret checks if any of the search heads have a different shc_secret from namespace scoped secret and changes it
274274
func ApplyShcSecret(ctx context.Context, mgr *searchHeadClusterPodManager, replicas int32, podExecClient splutil.PodExecClientImpl) error {
275-
276-
277275
// Get namespace scoped secret
278276
namespaceSecret, err := splutil.ApplyNamespaceScopedSecretObject(ctx, mgr.c, mgr.cr.GetNamespace())
279277
if err != nil {
@@ -436,7 +434,6 @@ func ApplyShcSecret(ctx context.Context, mgr *searchHeadClusterPodManager, repli
436434

437435
// Update for searchHeadClusterPodManager handles all updates for a statefulset of search heads
438436
func (mgr *searchHeadClusterPodManager) Update(ctx context.Context, c splcommon.ControllerClient, statefulSet *appsv1.StatefulSet, desiredReplicas int32) (enterpriseApi.Phase, error) {
439-
440437
// Assign client
441438
if mgr.c == nil {
442439
mgr.c = c
@@ -470,7 +467,6 @@ func (mgr *searchHeadClusterPodManager) Update(ctx context.Context, c splcommon.
470467

471468
// PrepareScaleDown for searchHeadClusterPodManager prepares search head pod to be removed via scale down event; it returns true when ready
472469
func (mgr *searchHeadClusterPodManager) PrepareScaleDown(ctx context.Context, n int32) (bool, error) {
473-
474470
// start by quarantining the pod
475471
result, err := mgr.PrepareRecycle(ctx, n)
476472
if err != nil || !result {
@@ -492,7 +488,6 @@ func (mgr *searchHeadClusterPodManager) PrepareScaleDown(ctx context.Context, n
492488

493489
// PrepareRecycle for searchHeadClusterPodManager prepares search head pod to be recycled for updates; it returns true when ready
494490
func (mgr *searchHeadClusterPodManager) PrepareRecycle(ctx context.Context, n int32) (bool, error) {
495-
496491
memberName := GetSplunkStatefulsetPodName(SplunkSearchHead, mgr.cr.GetName(), n)
497492

498493
switch mgr.cr.Status.Members[n].Status {

0 commit comments

Comments
 (0)