mirror of
https://github.com/ghndrx/k8s-game-2048.git
synced 2026-02-10 06:45:07 +00:00
fix: Configure webhook handler to use in-cluster service account
- Remove kubeconfig file mounting to use in-cluster service account - Remove Docker socket mount (not needed for Knative deployments) - Fix Kubernetes API connectivity issues - Webhook deployment now working successfully with proper RBAC
This commit is contained in:
@@ -38,8 +38,13 @@ def verify_signature(payload, signature):
|
||||
def run_command(cmd, **kwargs):
|
||||
"""Run shell command with logging"""
|
||||
logger.info(f"Running command: {' '.join(cmd)}")
|
||||
|
||||
# Set up environment for kubectl to use in-cluster config
|
||||
env = os.environ.copy()
|
||||
env['KUBECONFIG'] = '' # Force kubectl to use in-cluster config
|
||||
|
||||
try:
|
||||
result = subprocess.run(cmd, check=True, capture_output=True, text=True, **kwargs)
|
||||
result = subprocess.run(cmd, check=True, capture_output=True, text=True, env=env, **kwargs)
|
||||
logger.info(f"Command output: {result.stdout}")
|
||||
return result
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
||||
Reference in New Issue
Block a user