Updates to 151ef51f9942b3fe8bcea86a09a4adf1b2797eda #228
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
# This workflow deploys StockTrder CR to OCP cluster in IBM Cloud | |
# | |
### Before you begin: | |
# - Have access to AWS | |
# - Your EKS Cluster must be provisioned | |
# - Your target namespace must be created | |
# - Have a secret in the above namespace titled `stock-trader-credentials`, which contains the realized contents of: | |
# https://github.com/IBMStockTrader/stocktrader-operator/blob/master/helm-charts/stocktrader/templates/credentials.yaml | |
# - Have the StockTrader operator installed | |
# - Have all the required services already deployed. | |
# - Secret Access Key and ID set up in IAM and set up as repo secret (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) | |
# - This user, where you generated the Secret Access Key and ID needs the eks:ListCluster and eks:DescribeCluster rights. (set this up in AWS IAM) | |
# - This user needs to be added to your cluster auth config map: | |
# `kubectl edit -n kube-system configmap/aws-auth` | |
# ...... | |
# username: system:node:{{EC2PrivateDNSName}} | |
# mapUsers: | | |
# - userarn: arn:aws:iam::<account>:user/<user> | |
# username: <user> | |
# groups: | |
# - system:masters | |
# - Secrets AWS_CLUSTER_NAMESPACE, AWS_REGION, and AWS_CLUSTER_NAME also set up in the repo. | |
name: Deploy to EKS | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '.github/**' | |
# Environment variables available to all jobs and steps in this workflow | |
env: | |
CLUSTER_NAMESPACE: ${{ secrets.AWS_CLUSTER_NAMESPACE }} | |
jobs: | |
deploy-to-eks: | |
name: Deploy to AWS EKS Cluster | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout repo | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Deploy CR to namespace | |
- name: Deploy to EKS | |
uses: cancue/[email protected] | |
env: | |
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws_region: ${{ secrets.AWS_REGION }} | |
cluster_name: ${{ secrets.AWS_CLUSTER_NAME }} | |
with: | |
args: | | |
kubectl apply -f application/stocktrader-aws-eks-cr.yml -n ${CLUSTER_NAMESPACE} |