This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto3 import client | |
import jmespath | |
import os | |
codepipeline_client = client('codepipeline') | |
codepipeline_name = (os.environ['CODEBUILD_INITIATOR'], 'codepipeline/') | |
pipeline_response = codepipeline_client.get_pipeline_state( | |
name="".join(codepipeline_name) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## get initial admin password | |
kubectl -n argocd get secrets argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d | |
## login to argocd server with cli | |
argocd login $(kubectl -n argocd get svc argocd-server --output=jsonpath='{.spec.clusterIP}') --insecure --username admin --password "<PASSWORD>" --insecure | |
## change service to NodePort | |
kubectl patch svc kubernetes-dashboard -n kubernetes-dashboard -p '{"spec": {"type": "NodePort"}}' | |
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}' |