k8s-helper-cli 0.5.2__py3-none-any.whl → 0.5.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
k8s_helper/__init__.py CHANGED
@@ -20,7 +20,7 @@ from .utils import (
20
20
  create_service_manifest
21
21
  )
22
22
 
23
- __version__ = "0.5.2"
23
+ __version__ = "0.5.4"
24
24
  __author__ = "Harshit Chatterjee"
25
25
  __email__ = "harshitchatterjee50@gmail.com"
26
26
 
k8s_helper/core.py CHANGED
@@ -3397,14 +3397,14 @@ scrape_configs:
3397
3397
  subprocess.run([
3398
3398
  'helm', 'repo', 'add', 'prometheus-community',
3399
3399
  'https://prometheus-community.github.io/helm-charts'
3400
- ], check=True, capture_output=True)
3400
+ ], check=True, capture_output=True, text=True)
3401
3401
 
3402
- subprocess.run(['helm', 'repo', 'update'], check=True, capture_output=True)
3402
+ subprocess.run(['helm', 'repo', 'update'], check=True, capture_output=True, text=True)
3403
3403
  print("✅ Helm repository added and updated")
3404
3404
  except subprocess.CalledProcessError as e:
3405
3405
  return {
3406
3406
  'success': False,
3407
- 'error': f'Failed to add Helm repository: {e.stderr.decode() if e.stderr else str(e)}'
3407
+ 'error': f'Failed to add Helm repository: {e.stderr if e.stderr else str(e)}'
3408
3408
  }
3409
3409
 
3410
3410
  # Create Helm values file
@@ -3418,16 +3418,35 @@ scrape_configs:
3418
3418
  'service': {
3419
3419
  'type': grafana_service_type
3420
3420
  },
3421
+ 'env': {
3422
+ 'GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS': 'true',
3423
+ 'GF_INSTALL_PLUGINS': '', # Disable automatic plugin installation
3424
+ 'GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION': 'false'
3425
+ },
3421
3426
  'adminPassword': 'admin',
3427
+ 'plugins': [], # Disable problematic plugins
3428
+ 'sidecar': {
3429
+ 'datasources': {
3430
+ 'enabled': True,
3431
+ 'defaultDatasourceEnabled': True
3432
+ },
3433
+ 'dashboards': {
3434
+ 'enabled': True,
3435
+ 'searchNamespace': 'ALL'
3436
+ }
3437
+ },
3422
3438
  'datasources': {
3423
3439
  'datasources.yaml': {
3424
3440
  'apiVersion': 1,
3441
+ 'deleteDatasources': [],
3425
3442
  'datasources': [{
3426
3443
  'name': 'Prometheus',
3427
3444
  'type': 'prometheus',
3428
3445
  'url': 'http://kube-prometheus-stack-prometheus:9090',
3429
3446
  'access': 'proxy',
3430
- 'isDefault': True
3447
+ 'isDefault': True,
3448
+ 'uid': 'prometheus',
3449
+ 'editable': True
3431
3450
  }]
3432
3451
  }
3433
3452
  },
@@ -3573,7 +3592,7 @@ scrape_configs:
3573
3592
  os.unlink(values_file)
3574
3593
 
3575
3594
  except subprocess.CalledProcessError as e:
3576
- error_msg = e.stderr.decode() if e.stderr else str(e)
3595
+ error_msg = e.stderr if e.stderr else str(e)
3577
3596
  return {
3578
3597
  'success': False,
3579
3598
  'error': f'Helm installation failed: {error_msg}'
@@ -3678,7 +3697,7 @@ scrape_configs:
3678
3697
  }
3679
3698
 
3680
3699
  except subprocess.CalledProcessError as e:
3681
- error_msg = e.stderr.decode() if e.stderr else str(e)
3700
+ error_msg = e.stderr if e.stderr else str(e)
3682
3701
  return {
3683
3702
  'success': False,
3684
3703
  'error': f'Failed to uninstall Helm release: {error_msg}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: k8s-helper-cli
3
- Version: 0.5.2
3
+ Version: 0.5.4
4
4
  Summary: A simplified Python wrapper for common Kubernetes operations
5
5
  Author-email: Harshit Chatterjee <harshitchatterjee50@gmail.com>
6
6
  License-Expression: MIT
@@ -0,0 +1,11 @@
1
+ k8s_helper/__init__.py,sha256=gUWB4xYXMEreqzLysQl_uJNpM69McyFg5pWnoiPSus8,2666
2
+ k8s_helper/cli.py,sha256=3eP3J7srPIM0bm_G5RxdU_RvtDwJHLX2xBguF2EmXtk,95115
3
+ k8s_helper/config.py,sha256=P7YdfyvCHprrNs2J9DRb3RrClylfTTh5hfTtDzLug0A,6867
4
+ k8s_helper/core.py,sha256=Jljg5GopWsIeObkEQQOU7jnojMJVBuciDR-VFejliUE,161376
5
+ k8s_helper/utils.py,sha256=wYgTd5ktyuI-EiVcfW7FrxA7MzXY5odrEKQgmMVdueY,9496
6
+ k8s_helper_cli-0.5.4.dist-info/licenses/LICENSE,sha256=tXPvVl3gLVc6e0qCEoLH9KjeA7z4JVL78UybpvGtBCw,1096
7
+ k8s_helper_cli-0.5.4.dist-info/METADATA,sha256=q5XC7y15-XCng9ZaedB0voXNzI2JYAX4yx_8d8p5D5g,30789
8
+ k8s_helper_cli-0.5.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
+ k8s_helper_cli-0.5.4.dist-info/entry_points.txt,sha256=IoCMWUZ6mn90LwzQzEy5YkWOwvogDdZ6ycqUWAzCFTQ,50
10
+ k8s_helper_cli-0.5.4.dist-info/top_level.txt,sha256=x9A1jflyer-z2cFnkqk5B42juoH2q0fy5hkT9upsTG8,11
11
+ k8s_helper_cli-0.5.4.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- k8s_helper/__init__.py,sha256=6P0gvzwSbX4EBvqjSs8DO6uNsGzJAFG36qUqVY9vlnQ,2666
2
- k8s_helper/cli.py,sha256=3eP3J7srPIM0bm_G5RxdU_RvtDwJHLX2xBguF2EmXtk,95115
3
- k8s_helper/config.py,sha256=P7YdfyvCHprrNs2J9DRb3RrClylfTTh5hfTtDzLug0A,6867
4
- k8s_helper/core.py,sha256=WNri9uYRPdU_NRCdEpkgJhxzAC3iKaF2UntALvZS4ng,160448
5
- k8s_helper/utils.py,sha256=wYgTd5ktyuI-EiVcfW7FrxA7MzXY5odrEKQgmMVdueY,9496
6
- k8s_helper_cli-0.5.2.dist-info/licenses/LICENSE,sha256=tXPvVl3gLVc6e0qCEoLH9KjeA7z4JVL78UybpvGtBCw,1096
7
- k8s_helper_cli-0.5.2.dist-info/METADATA,sha256=1G1nZLtXZPaYsaCr4pyjRWqor80TUNa0DnQhSriSZSo,30789
8
- k8s_helper_cli-0.5.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
9
- k8s_helper_cli-0.5.2.dist-info/entry_points.txt,sha256=IoCMWUZ6mn90LwzQzEy5YkWOwvogDdZ6ycqUWAzCFTQ,50
10
- k8s_helper_cli-0.5.2.dist-info/top_level.txt,sha256=x9A1jflyer-z2cFnkqk5B42juoH2q0fy5hkT9upsTG8,11
11
- k8s_helper_cli-0.5.2.dist-info/RECORD,,