[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-all-posts":3},[4,770,1228,2840,5500,7409],{"id":5,"title":6,"author":7,"body":8,"cover":750,"date":751,"description":14,"draft":752,"excerpt":753,"extension":754,"github":21,"keywords":755,"meta":756,"navigation":757,"path":758,"seo":759,"shortDesc":753,"slug":760,"stem":761,"tags":762,"video":753,"__hash__":769},"blog/blog/2024/08/06/gitlab-docker-python.md","GitLab CI with Python and Docker!","Oz Shemesh",{"type":9,"value":10,"toc":728},"minimark",[11,25,28,33,68,72,78,183,187,190,197,209,212,226,229,256,259,262,266,272,329,332,336,339,359,366,369,373,376,382,386,389,409,415,419,433,437,440,454,457,474,480,485,493,520,524,533,537,540,544,547,574,578,581,652,658,662,665,669,694,698,721,724],[12,13,15],"info-box",{"type":14},"",[16,17,18],"p",{},[19,20,24],"a",{"href":21,"rel":22},"https://gitlab.com/devozs/counter-service",[23],"nofollow","Show me the Code!",[16,26,27],{},"This is a simple Flask application that counts the number of POST and GET requests it receives.",[29,30,32],"h2",{"id":31},"setup","Setup",[34,35,36,50,59],"ol",{},[37,38,39,40],"li",{},"Clone the repository:",[41,42,47],"pre",{"className":43,"code":45,"language":46},[44],"language-text","git clone https://gitlab.com/devozs/counter-service\ncd counter-service\n","text",[48,49,45],"code",{"__ignoreMap":14},[37,51,52,53],{},"Create a virtual environment and activate it:",[41,54,57],{"className":55,"code":56,"language":46},[44],"python -m venv venv\nsource venv/bin/activate  # On Windows, use `venv\\Scripts\\activate`\n",[48,58,56],{"__ignoreMap":14},[37,60,61,62],{},"Install the requirements:",[41,63,66],{"className":64,"code":65,"language":46},[44],"pip install -r requirements.txt\n",[48,67,65],{"__ignoreMap":14},[29,69,71],{"id":70},"project-structure","Project Structure",[41,73,76],{"className":74,"code":75,"language":46},[44],"counter_service/\n├── app/\n│   ├── __init__.py\n│   ├── routes.py\n│   └── counter.py\n├── certs/\n│   ├── generate-self-signed-cert.sh\n│   ├── cert.pem (generated)\n│   └── key.pem (generated)\n├── tests/\n│   ├── __init__.py\n│   └── test_routes.py\n├── config.py\n├── counter_service.py\n├── run_server.sh\n├── run_pytest.sh\n├── requirements.txt\n└── README.md\n",[48,77,75],{"__ignoreMap":14},[79,80,81,107,133,147,153,159,165,171,177],"ul",{},[37,82,83,86,87],{},[48,84,85],{},"app/",": Contains the main application code\n",[79,88,89,95,101],{},[37,90,91,94],{},[48,92,93],{},"__init__.py",": Initializes the Flask application",[37,96,97,100],{},[48,98,99],{},"routes.py",": Defines the application routes",[37,102,103,106],{},[48,104,105],{},"counter.py",": Implements the Counter class for tracking requests",[37,108,109,112,113],{},[48,110,111],{},"certs/",": Contains SSL certificate-related files\n",[79,114,115,121,127],{},[37,116,117,120],{},[48,118,119],{},"generate-self-signed-cert.sh",": Script to generate self-signed SSL certificates",[37,122,123,126],{},[48,124,125],{},"cert.pem",": SSL certificate (generated by the script)",[37,128,129,132],{},[48,130,131],{},"key.pem",": SSL private key (generated by the script)",[37,134,135,138,139],{},[48,136,137],{},"tests/",": Contains test files\n",[79,140,141],{},[37,142,143,146],{},[48,144,145],{},"test_routes.py",": Tests for the application routes",[37,148,149,152],{},[48,150,151],{},"config.py",": Configuration settings for the application",[37,154,155,158],{},[48,156,157],{},"counter_service.py",": Main script to run the Flask application",[37,160,161,164],{},[48,162,163],{},"run_server.sh",": Bash script to run the application with or without SSL",[37,166,167,170],{},[48,168,169],{},"run_pytest.sh",": Bash script to run the application tests",[37,172,173,176],{},[48,174,175],{},"requirements.txt",": List of Python dependencies",[37,178,179,182],{},[48,180,181],{},"README.md",": Project documentation",[29,184,186],{"id":185},"ssl-configuration","SSL Configuration",[16,188,189],{},"SSL configuration is separate from the environment configuration. You can run any environment (development, production, testing) with or without SSL by adding the 'ssl' argument to the script.",[16,191,192,193,196],{},"If running with SSL, the application expects the following files in the ",[48,194,195],{},"certs"," directory:",[79,198,199,204],{},[37,200,201,203],{},[48,202,125],{},": SSL certificate",[37,205,206,208],{},[48,207,131],{},": SSL private key",[16,210,211],{},"To generate self-signed certificates for testing purposes, use the provided script:",[34,213,214,217],{},[37,215,216],{},"Navigate to the project root directory.",[37,218,219,220],{},"Run the following command:\n",[41,221,224],{"className":222,"code":223,"language":46},[44],"(cd certs && ./generate-self-signed-cert.sh)\n",[48,225,223],{"__ignoreMap":14},[16,227,228],{},"This script will generate a self-signed certificate and key with the following details:",[79,230,231,234,237,240,243,246,249],{},[37,232,233],{},"Country: IL",[37,235,236],{},"State: Haifa",[37,238,239],{},"Locality: Haifa",[37,241,242],{},"Organization: DevOzs",[37,244,245],{},"Organizational Unit: DevOps",[37,247,248],{},"Common Name: localhost",[37,250,251,252],{},"Email: ",[19,253,255],{"href":254},"mailto:admin@devozs.com","admin@devozs.com",[16,257,258],{},"The certificate will be valid for 365 days.",[16,260,261],{},"Note: These self-signed certificates should only be used for development and testing purposes. For production environments, always use certificates from a trusted Certificate Authority.",[29,263,265],{"id":264},"running-the-application","Running the Application",[16,267,268,269,271],{},"You can run the application using the ",[48,270,163],{}," script with various configurations:",[34,273,274,293,302,311,320],{},[37,275,276,277,283,286,287],{},"Development mode without SSL (default):",[41,278,281],{"className":279,"code":280,"language":46},[44],"./run_server.sh\n",[48,282,280],{"__ignoreMap":14},[284,285],"br",{},"or",[41,288,291],{"className":289,"code":290,"language":46},[44],"./run_server.sh development\n",[48,292,290],{"__ignoreMap":14},[37,294,295,296],{},"Production mode without SSL:",[41,297,300],{"className":298,"code":299,"language":46},[44],"./run_server.sh production\n",[48,301,299],{"__ignoreMap":14},[37,303,304,305],{},"Testing mode without SSL:",[41,306,309],{"className":307,"code":308,"language":46},[44],"./run_server.sh testing\n",[48,310,308],{"__ignoreMap":14},[37,312,313,314],{},"Development mode with SSL:",[41,315,318],{"className":316,"code":317,"language":46},[44],"./run_server.sh development ssl\n",[48,319,317],{"__ignoreMap":14},[37,321,322,323],{},"Production mode with SSL:",[41,324,327],{"className":325,"code":326,"language":46},[44],"./run_server.sh production ssl\n",[48,328,326],{"__ignoreMap":14},[16,330,331],{},"Note: Running with SSL requires root privileges and will prompt for your password.",[29,333,335],{"id":334},"using-the-api","Using the API",[16,337,338],{},"You can interact with the API using curl commands:",[34,340,341,350],{},[37,342,343,344],{},"To make a GET request and view the current count:",[41,345,348],{"className":346,"code":347,"language":46},[44],"curl http://localhost:5000  # If running without SSL\ncurl -k https://localhost   # If running with SSL\n",[48,349,347],{"__ignoreMap":14},[37,351,352,353],{},"To make a POST request and increment the counter:",[41,354,357],{"className":355,"code":356,"language":46},[44],"curl -X POST http://localhost:5000  # If running without SSL\ncurl -k -X POST https://localhost   # If running with SSL\n",[48,358,356],{"__ignoreMap":14},[16,360,361,362,365],{},"The ",[48,363,364],{},"-k"," flag is used to allow insecure connections when using self-signed certificates.",[16,367,368],{},"You can alternate between these commands to see the counter increment for both GET and POST requests.",[29,370,372],{"id":371},"running-the-tests","Running the tests",[16,374,375],{},"Run the tests using pytest:",[41,377,380],{"className":378,"code":379,"language":46},[44],"pytest tests/\n",[48,381,379],{"__ignoreMap":14},[29,383,385],{"id":384},"configuration","Configuration",[16,387,388],{},"The application uses different configuration classes for different environments:",[79,390,391,397,403],{},[37,392,393,396],{},[48,394,395],{},"DevelopmentConfig",": Used for development.",[37,398,399,402],{},[48,400,401],{},"TestingConfig",": Used for testing.",[37,404,405,408],{},[48,406,407],{},"ProductionConfig",": Used for production.",[16,410,411,412,414],{},"You can modify these configurations in the ",[48,413,151],{}," file.",[29,416,418],{"id":417},"api-endpoints","API Endpoints",[79,420,421,427],{},[37,422,423,426],{},[48,424,425],{},"GET /",": Returns the current count of POST and GET requests",[37,428,429,432],{},[48,430,431],{},"POST /",": Increments the POST counter and returns the updated count",[29,434,436],{"id":435},"running-tests","Running Tests",[16,438,439],{},"To run the tests for the Counter Service application:",[34,441,442,445],{},[37,443,444],{},"Ensure you're in the root directory of the project.",[37,446,447,448],{},"Run the test script:",[41,449,452],{"className":450,"code":451,"language":46},[44],"./run_pytest.sh\n",[48,453,451],{"__ignoreMap":14},[16,455,456],{},"This script will:",[79,458,459,462,465,471],{},[37,460,461],{},"Activate the virtual environment",[37,463,464],{},"Set the FLASK_ENV to 'testing'",[37,466,467,468,470],{},"Run pytest on the tests in the ",[48,469,137],{}," directory",[37,472,473],{},"Deactivate the virtual environment after tests are complete",[16,475,476,477,479],{},"The tests use the ",[48,478,401],{}," configuration, which is designed for testing purposes. This ensures that your tests are run in an environment that mimics your production setup but is safe for testing.",[481,482,484],"h3",{"id":483},"test-configuration","Test Configuration",[16,486,361,487,489,490,492],{},[48,488,401],{}," in ",[48,491,151],{}," is used for running tests. You can modify this configuration to set up any specific settings needed for your test environment. For example:",[41,494,498],{"className":495,"code":496,"language":497,"meta":14,"style":14},"language-python shiki shiki-themes nord github-dark monokai","class TestingConfig(Config):\n    TESTING = True\n    # Add any other test-specific configurations here\n","python",[48,499,500,508,514],{"__ignoreMap":14},[501,502,505],"span",{"class":503,"line":504},"line",1,[501,506,507],{},"class TestingConfig(Config):\n",[501,509,511],{"class":503,"line":510},2,[501,512,513],{},"    TESTING = True\n",[501,515,517],{"class":503,"line":516},3,[501,518,519],{},"    # Add any other test-specific configurations here\n",[481,521,523],{"id":522},"writing-tests","Writing Tests",[16,525,526,527,529,530,532],{},"When writing new tests, ensure they are placed in the ",[48,528,137],{}," directory. The ",[48,531,145],{}," file contains examples of how to write tests for your routes.",[29,534,536],{"id":535},"docker-setup","Docker Setup",[16,538,539],{},"This project includes a Dockerfile for containerizing the Counter Service application. The Docker setup is optimized for running the application on port 5000 without SSL.",[481,541,543],{"id":542},"building-the-docker-image","Building the Docker Image",[16,545,546],{},"To build the Docker image:",[41,548,552],{"className":549,"code":550,"language":551,"meta":14,"style":14},"language-bash shiki shiki-themes nord github-dark monokai","docker build -t counter-service .\n","bash",[48,553,554],{"__ignoreMap":14},[501,555,556,560,564,568,571],{"class":503,"line":504},[501,557,559],{"class":558},"sNHwn","docker",[501,561,563],{"class":562},"siq7d"," build",[501,565,567],{"class":566},"sqTyp"," -t",[501,569,570],{"class":562}," counter-service",[501,572,573],{"class":562}," .\n",[481,575,577],{"id":576},"running-the-application-in-docker","Running the Application in Docker",[16,579,580],{},"You can run the application in different modes using Docker:\nPlease note that the current Docker configuration does not support running the application with SSL on port 443. The application is set up to run on port 5000 without SSL when using Docker.",[34,582,583,629],{},[37,584,585,586,607,286,609],{},"Production mode (default):",[41,587,589],{"className":549,"code":588,"language":551,"meta":14,"style":14},"docker run -p 5000:5000 counter-service\n",[48,590,591],{"__ignoreMap":14},[501,592,593,595,598,601,604],{"class":503,"line":504},[501,594,559],{"class":558},[501,596,597],{"class":562}," run",[501,599,600],{"class":566}," -p",[501,602,603],{"class":562}," 5000:5000",[501,605,606],{"class":562}," counter-service\n",[284,608],{},[41,610,612],{"className":549,"code":611,"language":551,"meta":14,"style":14},"docker run -p 5000:5000 counter-service production\n",[48,613,614],{"__ignoreMap":14},[501,615,616,618,620,622,624,626],{"class":503,"line":504},[501,617,559],{"class":558},[501,619,597],{"class":562},[501,621,600],{"class":566},[501,623,603],{"class":562},[501,625,570],{"class":562},[501,627,628],{"class":562}," production\n",[37,630,631,632],{},"Development mode:",[41,633,635],{"className":549,"code":634,"language":551,"meta":14,"style":14},"docker run -p 5000:5000 counter-service development\n",[48,636,637],{"__ignoreMap":14},[501,638,639,641,643,645,647,649],{"class":503,"line":504},[501,640,559],{"class":558},[501,642,597],{"class":562},[501,644,600],{"class":566},[501,646,603],{"class":562},[501,648,570],{"class":562},[501,650,651],{"class":562}," development\n",[16,653,654,655],{},"The application will be accessible at ",[48,656,657],{},"http://localhost:5000",[29,659,661],{"id":660},"future-enhancements-and-notes","Future Enhancements and Notes",[16,663,664],{},"As we continue to develop and improve this project, we've identified several areas for future enhancements and some important notes:",[481,666,668],{"id":667},"cicd-improvements","CI/CD Improvements",[79,670,671,682,688],{},[37,672,673,677,678,681],{},[674,675,676],"strong",{},"Docker Run in CI",": The ",[48,679,680],{},"run_docker"," step at the end of the CI pipeline is currently included for demonstration purposes only. In a production environment, this step would be unnecessary as the image is already pushed to the registry.",[37,683,684,687],{},[674,685,686],{},"Image Scanning",": Implement image scanning using tools like Trivy or similar to enhance security and identify vulnerabilities in our Docker images.",[37,689,690,693],{},[674,691,692],{},"Merge Request Approvals",": Consider implementing additional merge request approvals and other GitLab approval processes to enhance code quality and security.",[481,695,697],{"id":696},"dockerfile-optimizations","Dockerfile Optimizations",[79,699,700,706,712],{},[37,701,702,705],{},[674,703,704],{},"Single Layer Build",": The current Dockerfile uses a two-layer build for demonstration purposes. In the future, we may optimize this to a single layer for efficiency.",[37,707,708,711],{},[674,709,710],{},"Rootless Docker Build",": Explore using Podman for rootless Docker builds to enhance security.",[37,713,714,717,718,720],{},[674,715,716],{},"Requirement Separation",": Investigate the option to split ",[48,719,175],{}," into separate files for application and testing dependencies.",[16,722,723],{},"These enhancements and notes serve as a roadmap for future development. They reflect our commitment to continuous improvement in terms of efficiency, security, and best practices. We welcome contributions and suggestions in any of these areas.",[725,726,727],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .sNHwn, html code.shiki .sNHwn{--shiki-default:#88C0D0;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .siq7d, html code.shiki .siq7d{--shiki-default:#A3BE8C;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sqTyp, html code.shiki .sqTyp{--shiki-default:#A3BE8C;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}",{"title":14,"searchDepth":510,"depth":510,"links":729},[730,731,732,733,734,735,736,737,738,742,746],{"id":31,"depth":510,"text":32},{"id":70,"depth":510,"text":71},{"id":185,"depth":510,"text":186},{"id":264,"depth":510,"text":265},{"id":334,"depth":510,"text":335},{"id":371,"depth":510,"text":372},{"id":384,"depth":510,"text":385},{"id":417,"depth":510,"text":418},{"id":435,"depth":510,"text":436,"children":739},[740,741],{"id":483,"depth":516,"text":484},{"id":522,"depth":516,"text":523},{"id":535,"depth":510,"text":536,"children":743},[744,745],{"id":542,"depth":516,"text":543},{"id":576,"depth":516,"text":577},{"id":660,"depth":510,"text":661,"children":747},[748,749],{"id":667,"depth":516,"text":668},{"id":696,"depth":516,"text":697},"./workflow.png","2024-08-06T08:00:00.000Z",false,null,"md","CI, Test, Build, Docker, Python, ECR",{},true,"/blog/2024/08/06/gitlab-docker-python",{"title":6,"description":14},"gitlab-docker-python","blog/2024/08/06/gitlab-docker-python",[763,764,765,766,767,768],"CI","Test","Build","Docker","Python","ECR","ODyYLIDNWHA6KBIYeP58hhDrVrKQ8jL36cQEVfAf1qk",{"id":771,"title":772,"author":7,"body":773,"cover":1211,"date":751,"description":14,"draft":752,"excerpt":753,"extension":754,"github":781,"keywords":1212,"meta":1213,"navigation":757,"path":1214,"seo":1215,"shortDesc":753,"slug":1216,"stem":1217,"tags":1218,"video":753,"__hash__":1227},"blog/blog/2024/08/06/tf-tg-flux-eks.md","Terraform, Terragrunt for IaC and FluxCD for GitOps",{"type":9,"value":774,"toc":1178},[775,783,786,790,793,817,821,827,831,834,838,841,856,859,863,877,881,884,918,922,925,929,940,943,954,956,959,963,966,970,990,993,1004,1007,1014,1018,1021,1032,1035,1039,1042,1048,1051,1054,1058,1061,1065,1076,1080,1083,1087,1095,1099,1114,1118,1144,1146,1148,1152,1166,1168,1175],[12,776,777],{"type":14},[16,778,779],{},[19,780,24],{"href":781,"rel":782},"https://gitlab.com/devozs/devops-infra",[23],[16,784,785],{},"This repository contains the Infrastructure as Code (IaC) using Terraform and Terragrunt, and implements GitOps practices using FluxCD for a simple counter application.",[29,787,789],{"id":788},"iac-terraform-and-terragrunt","IaC - Terraform and Terragrunt",[16,791,792],{},"We use Terraform with Terragrunt to manage our AWS infrastructure. The main components include:",[79,794,795,798],{},[37,796,797],{},"EKS Cluster",[37,799,800,801,805,806],{},"Modules (",[19,802,803],{"href":803,"rel":804},"https://gitlab.com/devozs/infrastructure-modules",[23],")\n",[79,807,808,811,814],{},[37,809,810],{},"VPC and Networking",[37,812,813],{},"IAM Roles and Policies",[37,815,816],{},"ECR Repository",[481,818,820],{"id":819},"directory-structure","Directory Structure",[41,822,825],{"className":823,"code":824,"language":46},[44],"infrastructure/\n├── dev/\n│   ├── eks/\n│   ├── vpc/\n│   └── ecr/\n├── modules/ (in a seperate repo)\n│   ├── eks/\n│   ├── vpc/\n│   └── ecr/\n└── terragrunt.hcl\n",[48,826,824],{"__ignoreMap":14},[29,828,830],{"id":829},"references-and-credits","References and Credits",[16,832,833],{},"In the development of this project, several external resources were invaluable:",[481,835,837],{"id":836},"terraform-and-terragrunt","Terraform and Terragrunt",[16,839,840],{},"For learning and implementing Terraform with Terragrunt, the following tutorial was extensively used:",[79,842,843,846,849],{},[37,844,845],{},"Title: \"Terraform & Terragrunt for AWS Beginner Project Tutorial\"",[37,847,848],{},"Author: Anton Putra",[37,850,851,852],{},"URL: ",[19,853,854],{"href":854,"rel":855},"https://www.youtube.com/watch?v=yduHaOj3XMg",[23],[16,857,858],{},"This tutorial provided crucial insights into setting up and managing AWS infrastructure using Terraform and Terragrunt, which greatly influenced the structure and approach of this project.",[481,860,862],{"id":861},"key-features","Key Features",[79,864,865,868,871,874],{},[37,866,867],{},"Modular design for reusability",[37,869,870],{},"Environment separation (dev, staging, prod)",[37,872,873],{},"Remote state management using S3 backend",[37,875,876],{},"IAM roles for EKS and ECR access",[481,878,880],{"id":879},"usage","Usage",[16,882,883],{},"To apply changes:",[41,885,887],{"className":549,"code":886,"language":551,"meta":14,"style":14},"cd infrastructure/dev\nterragrunt run-all plan\nterragrunt run-all apply\n",[48,888,889,898,909],{"__ignoreMap":14},[501,890,891,895],{"class":503,"line":504},[501,892,894],{"class":893},"sCWj5","cd",[501,896,897],{"class":562}," infrastructure/dev\n",[501,899,900,903,906],{"class":503,"line":510},[501,901,902],{"class":558},"terragrunt",[501,904,905],{"class":562}," run-all",[501,907,908],{"class":562}," plan\n",[501,910,911,913,915],{"class":503,"line":516},[501,912,902],{"class":558},[501,914,905],{"class":562},[501,916,917],{"class":562}," apply\n",[29,919,921],{"id":920},"gitops-fluxcd","GitOps - FluxCD",[16,923,924],{},"We use FluxCD for continuous deployment and GitOps practices.",[481,926,928],{"id":927},"components","Components",[79,930,931,934,937],{},[37,932,933],{},"Flux Bootstrap",[37,935,936],{},"Image Update Automation",[37,938,939],{},"Kustomize for Kubernetes manifests",[481,941,862],{"id":942},"key-features-1",[79,944,945,948,951],{},[37,946,947],{},"Automatic deployment of new container images",[37,949,950],{},"Git repository as the single source of truth",[37,952,953],{},"Kubernetes manifest management",[481,955,385],{"id":384},[16,957,958],{},"Flux is configured to watch the ECR repository for new images and automatically update the Kubernetes deployments.",[29,960,962],{"id":961},"cicd-pipeline","CI/CD Pipeline",[16,964,965],{},"We use GitLab CI for continuous integration and deployment.",[481,967,969],{"id":968},"pipeline-stages","Pipeline Stages",[34,971,972,975,978,981,984,987],{},[37,973,974],{},"Validate",[37,976,977],{},"Init",[37,979,980],{},"Plan",[37,982,983],{},"Apply",[37,985,986],{},"Destroy",[37,988,989],{},"Post-apply (Flux bootstrap)",[481,991,862],{"id":992},"key-features-2",[79,994,995,998,1001],{},[37,996,997],{},"Automatic Terraform plan and apply on changes to infrastructure code",[37,999,1000],{},"Manual approval step for apply stage",[37,1002,1003],{},"Flux bootstrap after successful infrastructure updates",[481,1005,385],{"id":1006},"configuration-1",[16,1008,1009,1010,1013],{},"The CI/CD pipeline is defined in ",[48,1011,1012],{},".gitlab-ci.yml"," at the root of this repository.",[29,1015,1017],{"id":1016},"application-details","Application Details",[16,1019,1020],{},"The counter application (in a separate repository) is a simple Python Flask app that:",[79,1022,1023,1026,1029],{},[37,1024,1025],{},"Counts POST and GET requests",[37,1027,1028],{},"Displays the current count",[37,1030,1031],{},"Shows the application version (to demonstrate live update)",[16,1033,1034],{},"The application is containerized and pushed to ECR, from where Flux picks up new versions for deployment.",[29,1036,1038],{"id":1037},"accessing-the-application","Accessing the Application",[16,1040,1041],{},"After deployment, the application is accessible via the Contour ingress controller. The URL for accessing the application is:",[41,1043,1046],{"className":1044,"code":1045,"language":46},[44],"http://a6c503949052c42ad8bcd686137bc100-40713477.eu-west-1.elb.amazonaws.com/counter\n",[48,1047,1045],{"__ignoreMap":14},[16,1049,1050],{},"This URL is composed of the DNS name of the AWS Elastic Load Balancer created by the Contour ingress controller, followed by the '/counter' path.",[16,1052,1053],{},"Note: This URL may change if the Load Balancer is recreated. Always refer to the most recent ELB DNS name in your AWS console or infrastructure outputs.",[29,1055,1057],{"id":1056},"versioning","Versioning",[16,1059,1060],{},"The application version is injected at build time and displayed on the web interface. This helps in identifying which version of the application is currently deployed.",[29,1062,1064],{"id":1063},"security-considerations","Security Considerations",[79,1066,1067,1070,1073],{},[37,1068,1069],{},"EKS cluster uses IAM roles for service accounts (IRSA)",[37,1071,1072],{},"Least privilege principle applied to IAM roles",[37,1074,1075],{},"Network policies and security groups restrict access",[29,1077,1079],{"id":1078},"monitoring-and-logging","Monitoring and Logging",[16,1081,1082],{},"Our application and infrastructure can be monitored through various methods:",[481,1084,1086],{"id":1085},"application-monitoring","Application Monitoring",[79,1088,1089],{},[37,1090,1091,1094],{},[674,1092,1093],{},"UI Counter Tracking",": Monitor the increase in counters directly through the application's user interface. This provides a real-time view of application usage.",[481,1096,1098],{"id":1097},"image-updates","Image Updates",[79,1100,1101],{},[37,1102,1103,1106,1107,1113],{},[674,1104,1105],{},"Flux Image Policy",": Use the following command to check the latest image update detected by Flux:\n",[41,1108,1111],{"className":1109,"code":1110,"language":46},[44],"flux get image policy\n",[48,1112,1110],{"__ignoreMap":14},"\nThis command shows which image versions Flux is aware of and which one it considers the latest.",[481,1115,1117],{"id":1116},"pod-information","Pod Information",[79,1119,1120],{},[37,1121,1122,1125,1126,1132,1133,1136,1137,1143],{},[674,1123,1124],{},"Kubernetes Pod Details",": To get information about the currently running pod, including the image version in use, use the following kubectl command:\n",[41,1127,1130],{"className":1128,"code":1129,"language":46},[44],"kubectl describe pod -n counter-service \u003Cpod-name>\n",[48,1131,1129],{"__ignoreMap":14},"\nReplace ",[48,1134,1135],{},"\u003Cpod-name>"," with the actual name of your pod. For example:\n",[41,1138,1141],{"className":1139,"code":1140,"language":46},[44],"kubectl describe pod -n counter-service counter-service-f5f75fc69-5wd2k\n",[48,1142,1140],{"__ignoreMap":14},"\nThis command provides detailed information about the pod, including which image version is currently deployed.",[29,1145,661],{"id":660},[16,1147,664],{},[481,1149,1151],{"id":1150},"infrastructure-and-gitops","Infrastructure and GitOps",[79,1153,1154,1160],{},[37,1155,1156,1159],{},[674,1157,1158],{},"FluxCD as a Module",": Implement FluxCD as an additional Terraform module instead of installing it within the CI pipeline. This would provide better management and versioning of the GitOps tooling.",[37,1161,1162,1165],{},[674,1163,1164],{},"CI Pipeline Structure",": Further refine the CI stages to create a more logical separation between the Terraform steps and Flux operations. This could improve pipeline clarity and maintainability.",[481,1167,668],{"id":667},[79,1169,1170],{},[37,1171,1172,1174],{},[674,1173,692],{},": Implement additional merge request approvals and other GitLab approval processes to enhance code quality and security.",[725,1176,1177],{},"html pre.shiki code .sCWj5, html code.shiki .sCWj5{--shiki-default:#88C0D0;--shiki-dark:#79B8FF;--shiki-sepia:#66D9EF}html pre.shiki code .siq7d, html code.shiki .siq7d{--shiki-default:#A3BE8C;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sNHwn, html code.shiki .sNHwn{--shiki-default:#88C0D0;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":14,"searchDepth":510,"depth":510,"links":1179},[1180,1183,1188,1193,1198,1199,1200,1201,1202,1207],{"id":788,"depth":510,"text":789,"children":1181},[1182],{"id":819,"depth":516,"text":820},{"id":829,"depth":510,"text":830,"children":1184},[1185,1186,1187],{"id":836,"depth":516,"text":837},{"id":861,"depth":516,"text":862},{"id":879,"depth":516,"text":880},{"id":920,"depth":510,"text":921,"children":1189},[1190,1191,1192],{"id":927,"depth":516,"text":928},{"id":942,"depth":516,"text":862},{"id":384,"depth":516,"text":385},{"id":961,"depth":510,"text":962,"children":1194},[1195,1196,1197],{"id":968,"depth":516,"text":969},{"id":992,"depth":516,"text":862},{"id":1006,"depth":516,"text":385},{"id":1016,"depth":510,"text":1017},{"id":1037,"depth":510,"text":1038},{"id":1056,"depth":510,"text":1057},{"id":1063,"depth":510,"text":1064},{"id":1078,"depth":510,"text":1079,"children":1203},[1204,1205,1206],{"id":1085,"depth":516,"text":1086},{"id":1097,"depth":516,"text":1098},{"id":1116,"depth":516,"text":1117},{"id":660,"depth":510,"text":661,"children":1208},[1209,1210],{"id":1150,"depth":516,"text":1151},{"id":667,"depth":516,"text":668},"./cd.png","IaC, Infra, AWS, EKS, Terraform, Terragrunt, FluxCD, GitLab",{"published":757},"/blog/2024/08/06/tf-tg-flux-eks",{"title":772,"description":14},"tf-tg-flux-eks","blog/2024/08/06/tf-tg-flux-eks",[1219,1220,1221,1222,1223,1224,1225,1226],"IaC","Infra","AWS","EKS","Terraform","Terragrunt","FluxCD","GitLab","iQMUr0D9yZDXUPKSEgcLleE6IMzJWyAxM5yjkryFUvU",{"id":1229,"title":1230,"author":7,"body":1231,"cover":750,"date":2827,"description":1235,"draft":752,"excerpt":753,"extension":754,"github":1242,"keywords":2828,"meta":2829,"navigation":757,"path":2830,"seo":2831,"shortDesc":753,"slug":2832,"stem":2833,"tags":2834,"video":753,"__hash__":2839},"blog/blog/2023/12/17/ci-cd-github-actions-flux-helm.md","GitHub Actions FluxCD & Helm",{"type":9,"value":1232,"toc":2811},[1233,1236,1244,1248,1251,1262,1265,1276,1280,1289,1298,1325,1328,1331,1448,1452,1482,1507,1515,1518,1534,1537,1540,1548,1552,1555,1578,1603,1607,1628,1631,1669,1671,1689,1693,1702,1833,1837,1840,1922,1926,1933,2056,2060,2063,2080,2084,2087,2095,2251,2255,2258,2263,2356,2426,2588,2593,2808],[16,1234,1235],{},"In the upcoming blog post, we will implement continuous integration and deployment with Helm and some GitOps characteristics",[12,1237,1238],{"type":14},[16,1239,1240],{},[19,1241,24],{"href":1242,"rel":1243},"https://github.com/devozs/maven-hello-world",[23],[29,1245,1247],{"id":1246},"guidelines","Guidelines",[16,1249,1250],{},"The primary focus of this blog post is to explore and showcase three key topics:",[34,1252,1253,1256,1259],{},[37,1254,1255],{},"Utilizing GitHub Actions Workflow",[37,1257,1258],{},"Implementing deployment through Helm, with an emphasis on basic templating techniques",[37,1260,1261],{},"Employing FluxCD for deployment and its integration with the HelmRelease resource and Image Automation",[16,1263,1264],{},"Considering that the blog post serves as an illustrative example, it's important to note that there are additional aspects of Continuous Integration (CI) and Continuous Deployment (CD) that are not covered in detail here. For instance, in the realm of CI, aspects such as testing methodologies and strategies play a crucial role. Similarly, in the CD complex processes within the workflow are also beyond the scope of this example.",[12,1266,1268],{"type":1267},"warning",[16,1269,1270,1271],{},"Make sure to install ",[19,1272,1275],{"href":1273,"rel":1274},"https://fluxcd.io/flux/installation/",[23],"FluxCD CLI and other prerequisites ",[29,1277,1279],{"id":1278},"repository-structure","Repository Structure",[16,1281,1282,1283,1288],{},"There are several ways to structure FluxCD repository ",[19,1284,1287],{"href":1285,"rel":1286},"https://fluxcd.io/flux/guides/repository-structure/",[23],"More information can be found here",".\nFor the sake of simplicity in this tutorial, we will utilize a monorepo approach, consolidating all Kubernetes manifests within a single Git repository.",[16,1290,1291,1292,1297],{},"This is a simple Java Maven repository that was forked from ",[19,1293,1296],{"href":1294,"rel":1295},"https://github.com/ido83/maven-hello-world/",[23],"here"," and on top of it we`ve added",[34,1299,1300,1303,1322],{},[37,1301,1302],{},"Dockerfile with simple multistage",[37,1304,1305,1306],{},"Two ways of deployment\n",[34,1307,1308,1311],{},[37,1309,1310],{},"Kubectl and Helm CLIs",[37,1312,1313,1314],{},"FluxCD\n",[34,1315,1316,1319],{},[37,1317,1318],{},"Using HelmRelease",[37,1320,1321],{},"Using Flux Image Controller / Policy",[37,1323,1324],{},"The above are orchestrated as CI and CD via GitHub Action Workflow",[16,1326,1327],{},"Our repository is structured in a manner of a monorepo, yet it has been simplified for the purposes of this example. This streamlined approach retains the core characteristics of a monorepo while ensuring ease of understanding and accessibility for demonstration purposes.",[16,1329,1330],{},"High level structure:",[41,1332,1334],{"className":549,"code":1333,"language":551,"meta":14,"style":14},"├── myapp (Java, Maven and Docker)\n└── deployment\n    ├── myapp-chart (Helm Chart)\n    └── flux\n        ├── apps\n        │   └── base\n        ├── infrastructure\n        │   └── dev\n        └── clusters\n            └── dev\n",[48,1335,1336,1359,1367,1383,1392,1401,1413,1421,1431,1440],{"__ignoreMap":14},[501,1337,1338,1341,1344,1348,1351,1354,1357],{"class":503,"line":504},[501,1339,1340],{"class":558},"├──",[501,1342,1343],{"class":562}," myapp",[501,1345,1347],{"class":1346},"sw3Zv"," (Java, ",[501,1349,1350],{"class":562},"Maven",[501,1352,1353],{"class":562}," and",[501,1355,1356],{"class":562}," Docker",[501,1358,805],{"class":1346},[501,1360,1361,1364],{"class":503,"line":510},[501,1362,1363],{"class":558},"└──",[501,1365,1366],{"class":562}," deployment\n",[501,1368,1369,1372,1375,1378,1381],{"class":503,"line":516},[501,1370,1371],{"class":558},"    ├──",[501,1373,1374],{"class":562}," myapp-chart",[501,1376,1377],{"class":1346}," (Helm ",[501,1379,1380],{"class":562},"Chart",[501,1382,805],{"class":1346},[501,1384,1386,1389],{"class":503,"line":1385},4,[501,1387,1388],{"class":558},"    └──",[501,1390,1391],{"class":562}," flux\n",[501,1393,1395,1398],{"class":503,"line":1394},5,[501,1396,1397],{"class":558},"        ├──",[501,1399,1400],{"class":562}," apps\n",[501,1402,1404,1407,1410],{"class":503,"line":1403},6,[501,1405,1406],{"class":558},"        │",[501,1408,1409],{"class":562},"   └──",[501,1411,1412],{"class":562}," base\n",[501,1414,1416,1418],{"class":503,"line":1415},7,[501,1417,1397],{"class":558},[501,1419,1420],{"class":562}," infrastructure\n",[501,1422,1424,1426,1428],{"class":503,"line":1423},8,[501,1425,1406],{"class":558},[501,1427,1409],{"class":562},[501,1429,1430],{"class":562}," dev\n",[501,1432,1434,1437],{"class":503,"line":1433},9,[501,1435,1436],{"class":558},"        └──",[501,1438,1439],{"class":562}," clusters\n",[501,1441,1443,1446],{"class":503,"line":1442},10,[501,1444,1445],{"class":558},"            └──",[501,1447,1430],{"class":562},[481,1449,1451],{"id":1450},"github-workflow","GitHub Workflow",[16,1453,1454,1455,1461,1462,1467,1468,1473,1474,1481],{},"We've breaken our pipline into three GitHub Action jobs): ",[1456,1457,1458],"em",{},[674,1459,1460],{},"app-build",", ",[1456,1463,1464],{},[674,1465,1466],{},"docker-build"," and ",[1456,1469,1470],{},[674,1471,1472],{},"deployment",".\nRefer to the workflow yaml located at ",[19,1475,1478],{"href":1476,"rel":1477},"https://github.com/devozs/maven-hello-world/blob/master/.github/workflows/myapp-workflow.yaml",[23],[48,1479,1480],{},".github/workflows/myapp-workflow.yaml"," for detailed information about the jobs and steps.\nNote: In case you want to run it on your repository make sure to create PAT in order to get repository access (same as describe below for setting GITHUB_TOKEN in order to locally run FluxCD)",[79,1483,1484,1490,1493],{},[37,1485,1486,1487],{},"app-build: Java build using Maven. i.e. ",[48,1488,1489],{},"mvn clean package",[37,1491,1492],{},"docker-build: In this phase, we build the container using the Dockerfile, just for the example the Dockerfile includes multilayer. This job stars running only after a succesful complition of app-build phase.",[37,1494,1495,1496],{},"deployment: triggering three independent jobs:\n",[79,1497,1498,1501,1504],{},[37,1499,1500],{},"Simple docker run",[37,1502,1503],{},"Kind cluster installation and Helm CLI (using the utility script)",[37,1505,1506],{},"Kind cluster installation and FluxCD bootstrap (using the utility script)",[16,1508,1509,1514],{},[1510,1511],"img",{"alt":1512,"src":1513,"title":1512},"GitHub Action Summary","/images/blog/2023/12/17/github-action-diagram.png","\nAt the buttom of the image you can see the logs of Helm CLI & FluxCD bootstrap steps (printing out the POD logs as explianed below).",[16,1516,1517],{},"Note: The repository also demostrate some branch protection:",[79,1519,1520,1523],{},[37,1521,1522],{},"Require a pull request & approvals before merging",[37,1524,1525,1526,1528,1529],{},"Require status checks to pass before merging, it will run the ",[48,1527,1460],{}," as part of the pull request\n",[1510,1530],{"alt":1531,"src":1532,"title":1533},"GitHub Branch Protection","/images/blog/2023/12/17/brach-protection.png","GitHub Action List",[29,1535,1536],{"id":1472},"Deployment",[16,1538,1539],{},"For your convinence you can use two utlity scripts:",[34,1541,1542,1545],{},[37,1543,1544],{},"setup.sh - Setup the required softwares (the same script called during the CI/CD workflow)",[37,1546,1547],{},"deploy.sh - Automate the deployment proccess for both options: Kubectl & Help CLIs as well as using FluxCD",[481,1549,1551],{"id":1550},"using-kubectl-and-helm-cli","Using Kubectl and Helm CLI",[16,1553,1554],{},"Executing the script:",[41,1556,1558],{"className":549,"code":1557,"language":551,"meta":14,"style":14},"cd deployment\n./deploy.sh -v 1.0.0\n",[48,1559,1560,1566],{"__ignoreMap":14},[501,1561,1562,1564],{"class":503,"line":504},[501,1563,894],{"class":893},[501,1565,1366],{"class":562},[501,1567,1568,1571,1574],{"class":503,"line":510},[501,1569,1570],{"class":558},"./deploy.sh",[501,1572,1573],{"class":566}," -v",[501,1575,1577],{"class":1576},"sX_qU"," 1.0.0\n",[16,1579,1580,1581,1586,1587,1590,1591,1594,1595,1598,1599,1602],{},"The script will install ",[19,1582,1585],{"href":1583,"rel":1584},"https://kind.sigs.k8s.io//",[23],"KIND Cluster"," and once the cluster is ready it will start the deployment using Helm Chart located at ",[48,1588,1589],{},"deployment/myapp-chart"," using ",[48,1592,1593],{},"values-dev.yaml"," templating as well as ",[48,1596,1597],{},"--set image.tag=${VERSION}"," as was set using the ",[48,1600,1601],{},"-v"," flag.",[481,1604,1606],{"id":1605},"using-fluxcd","Using FluxCD",[12,1608,1609,1617],{"type":1267},[16,1610,1611,1612],{},"Make to create and set ",[19,1613,1616],{"href":1614,"rel":1615},"https://fluxcd.io/flux/installation/bootstrap/github/",[23],"GITHUB_TOKEN ",[1618,1619,1620],"template",{"v-slot:details":14},[16,1621,1622,1623],{},"Or if you are using different Git server follow the ",[19,1624,1627],{"href":1625,"rel":1626},"https://fluxcd.io/flux/installation/bootstrap/",[23],"bootstrap documentation",[16,1629,1630],{},"You`ll need to set the both GITHUB_TOKEN & GITHUB_USER, it will be used by the utitlity script for FluxCD bootstrap command:",[41,1632,1634],{"className":549,"code":1633,"language":551,"meta":14,"style":14},"export GITHUB_TOKEN=\u003CYOUR_PAT>\nexport GITHUB_USER=\u003CYOUR_GH_USER>\n",[48,1635,1636,1655],{"__ignoreMap":14},[501,1637,1638,1642,1646,1649,1652],{"class":503,"line":504},[501,1639,1641],{"class":1640},"s4BcI","export",[501,1643,1645],{"class":1644},"sn_7u"," GITHUB_TOKEN",[501,1647,1648],{"class":1640},"=\u003C",[501,1650,1651],{"class":1644},"YOUR_PAT",[501,1653,1654],{"class":1640},">\n",[501,1656,1657,1659,1662,1664,1667],{"class":503,"line":510},[501,1658,1641],{"class":1640},[501,1660,1661],{"class":1644}," GITHUB_USER",[501,1663,1648],{"class":1640},[501,1665,1666],{"class":1644},"YOUR_GH_USER",[501,1668,1654],{"class":1640},[16,1670,1554],{},[41,1672,1674],{"className":549,"code":1673,"language":551,"meta":14,"style":14},"cd deployment\n./deploy.sh --flux\n",[48,1675,1676,1682],{"__ignoreMap":14},[501,1677,1678,1680],{"class":503,"line":504},[501,1679,894],{"class":893},[501,1681,1366],{"class":562},[501,1683,1684,1686],{"class":503,"line":510},[501,1685,1570],{"class":558},[501,1687,1688],{"class":566}," --flux\n",[481,1690,1692],{"id":1691},"verify-flux-pods","Verify Flux PODs",[16,1694,1695,1696,1701],{},"The following pods should be running on ",[1456,1697,1698],{},[674,1699,1700],{},"flux-system"," namespace",[41,1703,1705],{"className":549,"code":1704,"language":551,"meta":14,"style":14},"kubectl get pod -n flux-system\n\nNAME                                           READY   STATUS    RESTARTS   AGE\nhelm-controller-69dbf9568-tp4x6                1/1     Running   0          2m5s\nimage-automation-controller-6bbc947558-h82k6   1/1     Running   0          2m5s\nimage-reflector-controller-7c49fdc68f-skrjs    1/1     Running   0          2m5s\nkustomize-controller-77bf676476-cj5rr          1/1     Running   0          2m5s\nnotification-controller-7bb6d7684d-k9s9l       1/1     Running   0          2m5s\nsource-controller-5996567c74-kt5nt             1/1     Running   0          2m5s\n",[48,1706,1707,1724,1729,1746,1763,1777,1791,1805,1819],{"__ignoreMap":14},[501,1708,1709,1712,1715,1718,1721],{"class":503,"line":504},[501,1710,1711],{"class":558},"kubectl",[501,1713,1714],{"class":562}," get",[501,1716,1717],{"class":562}," pod",[501,1719,1720],{"class":566}," -n",[501,1722,1723],{"class":562}," flux-system\n",[501,1725,1726],{"class":503,"line":510},[501,1727,1728],{"emptyLinePlaceholder":757},"\n",[501,1730,1731,1734,1737,1740,1743],{"class":503,"line":516},[501,1732,1733],{"class":558},"NAME",[501,1735,1736],{"class":562},"                                           READY",[501,1738,1739],{"class":562},"   STATUS",[501,1741,1742],{"class":562},"    RESTARTS",[501,1744,1745],{"class":562},"   AGE\n",[501,1747,1748,1751,1754,1757,1760],{"class":503,"line":1385},[501,1749,1750],{"class":558},"helm-controller-69dbf9568-tp4x6",[501,1752,1753],{"class":562},"                1/1",[501,1755,1756],{"class":562},"     Running",[501,1758,1759],{"class":1576},"   0",[501,1761,1762],{"class":562},"          2m5s\n",[501,1764,1765,1768,1771,1773,1775],{"class":503,"line":1394},[501,1766,1767],{"class":558},"image-automation-controller-6bbc947558-h82k6",[501,1769,1770],{"class":562},"   1/1",[501,1772,1756],{"class":562},[501,1774,1759],{"class":1576},[501,1776,1762],{"class":562},[501,1778,1779,1782,1785,1787,1789],{"class":503,"line":1403},[501,1780,1781],{"class":558},"image-reflector-controller-7c49fdc68f-skrjs",[501,1783,1784],{"class":562},"    1/1",[501,1786,1756],{"class":562},[501,1788,1759],{"class":1576},[501,1790,1762],{"class":562},[501,1792,1793,1796,1799,1801,1803],{"class":503,"line":1415},[501,1794,1795],{"class":558},"kustomize-controller-77bf676476-cj5rr",[501,1797,1798],{"class":562},"          1/1",[501,1800,1756],{"class":562},[501,1802,1759],{"class":1576},[501,1804,1762],{"class":562},[501,1806,1807,1810,1813,1815,1817],{"class":503,"line":1423},[501,1808,1809],{"class":558},"notification-controller-7bb6d7684d-k9s9l",[501,1811,1812],{"class":562},"       1/1",[501,1814,1756],{"class":562},[501,1816,1759],{"class":1576},[501,1818,1762],{"class":562},[501,1820,1821,1824,1827,1829,1831],{"class":503,"line":1433},[501,1822,1823],{"class":558},"source-controller-5996567c74-kt5nt",[501,1825,1826],{"class":562},"             1/1",[501,1828,1756],{"class":562},[501,1830,1759],{"class":1576},[501,1832,1762],{"class":562},[481,1834,1836],{"id":1835},"exploring-flux-kustomizations","Exploring Flux Kustomizations",[16,1838,1839],{},"Flux manage the deployment and its dependencies using a kustomization resource.\nTo watch the kustomizations list and thier status:",[41,1841,1843],{"className":549,"code":1842,"language":551,"meta":14,"style":14},"flux get kustomizations\n\nNAME                REVISION            SUSPENDED   READY   MESSAGE                              \nflux-system         master@sha1:d27dac72    False       True    Applied revision: master@sha1:d27dac72  \nmyapp-dev           master@sha1:d27dac72    False       True    Applied revision: master@sha1:d27dac72  \n",[48,1844,1845,1855,1859,1878,1903],{"__ignoreMap":14},[501,1846,1847,1850,1852],{"class":503,"line":504},[501,1848,1849],{"class":558},"flux",[501,1851,1714],{"class":562},[501,1853,1854],{"class":562}," kustomizations\n",[501,1856,1857],{"class":503,"line":510},[501,1858,1728],{"emptyLinePlaceholder":757},[501,1860,1861,1863,1866,1869,1872,1875],{"class":503,"line":516},[501,1862,1733],{"class":558},[501,1864,1865],{"class":562},"                REVISION",[501,1867,1868],{"class":562},"            SUSPENDED",[501,1870,1871],{"class":562},"   READY",[501,1873,1874],{"class":562},"   MESSAGE",[501,1876,1877],{"class":1346},"                              \n",[501,1879,1880,1882,1885,1888,1891,1894,1897,1900],{"class":503,"line":1385},[501,1881,1700],{"class":558},[501,1883,1884],{"class":562},"         master@sha1:d27dac72",[501,1886,1887],{"class":562},"    False",[501,1889,1890],{"class":562},"       True",[501,1892,1893],{"class":562},"    Applied",[501,1895,1896],{"class":562}," revision:",[501,1898,1899],{"class":562}," master@sha1:d27dac72",[501,1901,1902],{"class":1346},"  \n",[501,1904,1905,1908,1911,1913,1915,1917,1919],{"class":503,"line":1394},[501,1906,1907],{"class":558},"myapp-dev",[501,1909,1910],{"class":562},"           master@sha1:d27dac72",[501,1912,1887],{"class":562},[501,1914,1890],{"class":562},[501,1916,1893],{"class":562},[501,1918,1896],{"class":562},[501,1920,1921],{"class":562}," master@sha1:d27dac72\n",[481,1923,1925],{"id":1924},"checking-the-logs","Checking the logs",[16,1927,1928,1929,1932],{},"Once the deployment is done, the script will get the POD i.e. ",[48,1930,1931],{},"myapp-6fc4d44c75-4jpvg"," logs and pring it out.",[41,1934,1936],{"className":549,"code":1935,"language":551,"meta":14,"style":14},"Starts new deployment...\nVersion: Managed By FluxCD\nDeploy using FluxCD\n\ndeployment \"myapp\" successfully rolled out\nPOD Image Details:\nImage: devozs/myapp:1.0.0\nImage ID: docker.io/devozs/myapp@sha256:0ac0962589fa30ca8d09f073a33fe7791359a295324aa237e2c5b6980f848415\nPOD Logs:\nHello World! DevOzs\nDeployment Done\n",[48,1937,1938,1949,1963,1973,1977,2000,2011,2019,2030,2037,2048],{"__ignoreMap":14},[501,1939,1940,1943,1946],{"class":503,"line":504},[501,1941,1942],{"class":558},"Starts",[501,1944,1945],{"class":562}," new",[501,1947,1948],{"class":562}," deployment...\n",[501,1950,1951,1954,1957,1960],{"class":503,"line":510},[501,1952,1953],{"class":558},"Version:",[501,1955,1956],{"class":562}," Managed",[501,1958,1959],{"class":562}," By",[501,1961,1962],{"class":562}," FluxCD\n",[501,1964,1965,1968,1971],{"class":503,"line":516},[501,1966,1967],{"class":558},"Deploy",[501,1969,1970],{"class":562}," using",[501,1972,1962],{"class":562},[501,1974,1975],{"class":503,"line":1385},[501,1976,1728],{"emptyLinePlaceholder":757},[501,1978,1979,1981,1985,1988,1991,1994,1997],{"class":503,"line":1394},[501,1980,1472],{"class":558},[501,1982,1984],{"class":1983},"sQE_P"," \"",[501,1986,1987],{"class":562},"myapp",[501,1989,1990],{"class":1983},"\"",[501,1992,1993],{"class":562}," successfully",[501,1995,1996],{"class":562}," rolled",[501,1998,1999],{"class":562}," out\n",[501,2001,2002,2005,2008],{"class":503,"line":1403},[501,2003,2004],{"class":558},"POD",[501,2006,2007],{"class":562}," Image",[501,2009,2010],{"class":562}," Details:\n",[501,2012,2013,2016],{"class":503,"line":1415},[501,2014,2015],{"class":558},"Image:",[501,2017,2018],{"class":562}," devozs/myapp:1.0.0\n",[501,2020,2021,2024,2027],{"class":503,"line":1423},[501,2022,2023],{"class":558},"Image",[501,2025,2026],{"class":562}," ID:",[501,2028,2029],{"class":562}," docker.io/devozs/myapp@sha256:0ac0962589fa30ca8d09f073a33fe7791359a295324aa237e2c5b6980f848415\n",[501,2031,2032,2034],{"class":503,"line":1433},[501,2033,2004],{"class":558},[501,2035,2036],{"class":562}," Logs:\n",[501,2038,2039,2042,2045],{"class":503,"line":1442},[501,2040,2041],{"class":558},"Hello",[501,2043,2044],{"class":562}," World!",[501,2046,2047],{"class":562}," DevOzs\n",[501,2049,2051,2053],{"class":503,"line":2050},11,[501,2052,1536],{"class":558},[501,2054,2055],{"class":562}," Done\n",[481,2057,2059],{"id":2058},"secrets","Secrets",[16,2061,2062],{},"In this tutorial, we haven't utilized a secret manager like Azure Key Vault or any other valut. In case you need to use secrets (i.e when using Flux Image Repository with private regitry) make sure not to keep your secrets in Git.",[12,2064,2066,2069],{"type":2065},"error",[16,2067,2068],{},"Make sure not to put your kubernetes secrets in Git",[1618,2070,2071],{"v-slot:details":14},[16,2072,2073,2074,2079],{},"For testing purpuse you can add them to gitignore. Permenant solution would be to use key vault or other solution like sealed-secrets (",[19,2075,2078],{"href":2076,"rel":2077},"https://fluxcd.io/flux/guides/sealed-secrets/",[23],"works well with FluxCD",")",[481,2081,2083],{"id":2082},"docker-pull-secret","Docker Pull Secret",[16,2085,2086],{},"In case you are workign with images from private registry, Docker pull secret is will used in two ways:",[79,2088,2089,2092],{},[37,2090,2091],{},"Pull the deployment image from Github registry",[37,2093,2094],{},"FluxCD uses it to fetch new tags from Github registry",[41,2096,2100],{"className":2097,"code":2098,"language":2099,"meta":14,"style":14},"language-yaml shiki shiki-themes nord github-dark monokai","apiVersion: v1\nkind: Secret\nmetadata:\n  name: cr-secret\n  namespace: flux-system\ntype: kubernetes.io/dockerconfigjson\ndata:\n  .dockerconfigjson: \u003CPUT_YOURS>\n---\napiVersion: v1\nkind: Secret\nmetadata:\n  name: cr-secret\n  namespace: dev\ntype: kubernetes.io/dockerconfigjson\ndata:\n  .dockerconfigjson: \u003CPUT_YOURS>\n","yaml",[48,2101,2102,2115,2125,2133,2143,2152,2162,2169,2179,2185,2193,2201,2208,2217,2226,2235,2242],{"__ignoreMap":14},[501,2103,2104,2108,2112],{"class":503,"line":504},[501,2105,2107],{"class":2106},"skFRX","apiVersion",[501,2109,2111],{"class":2110},"sUaCP",":",[501,2113,2114],{"class":562}," v1\n",[501,2116,2117,2120,2122],{"class":503,"line":510},[501,2118,2119],{"class":2106},"kind",[501,2121,2111],{"class":2110},[501,2123,2124],{"class":562}," Secret\n",[501,2126,2127,2130],{"class":503,"line":516},[501,2128,2129],{"class":2106},"metadata",[501,2131,2132],{"class":2110},":\n",[501,2134,2135,2138,2140],{"class":503,"line":1385},[501,2136,2137],{"class":2106},"  name",[501,2139,2111],{"class":2110},[501,2141,2142],{"class":562}," cr-secret\n",[501,2144,2145,2148,2150],{"class":503,"line":1394},[501,2146,2147],{"class":2106},"  namespace",[501,2149,2111],{"class":2110},[501,2151,1723],{"class":562},[501,2153,2154,2157,2159],{"class":503,"line":1403},[501,2155,2156],{"class":2106},"type",[501,2158,2111],{"class":2110},[501,2160,2161],{"class":562}," kubernetes.io/dockerconfigjson\n",[501,2163,2164,2167],{"class":503,"line":1415},[501,2165,2166],{"class":2106},"data",[501,2168,2132],{"class":2110},[501,2170,2171,2174,2176],{"class":503,"line":1423},[501,2172,2173],{"class":2106},"  .dockerconfigjson",[501,2175,2111],{"class":2110},[501,2177,2178],{"class":562}," \u003CPUT_YOURS>\n",[501,2180,2181],{"class":503,"line":1433},[501,2182,2184],{"class":2183},"siby6","---\n",[501,2186,2187,2189,2191],{"class":503,"line":1442},[501,2188,2107],{"class":2106},[501,2190,2111],{"class":2110},[501,2192,2114],{"class":562},[501,2194,2195,2197,2199],{"class":503,"line":2050},[501,2196,2119],{"class":2106},[501,2198,2111],{"class":2110},[501,2200,2124],{"class":562},[501,2202,2204,2206],{"class":503,"line":2203},12,[501,2205,2129],{"class":2106},[501,2207,2132],{"class":2110},[501,2209,2211,2213,2215],{"class":503,"line":2210},13,[501,2212,2137],{"class":2106},[501,2214,2111],{"class":2110},[501,2216,2142],{"class":562},[501,2218,2220,2222,2224],{"class":503,"line":2219},14,[501,2221,2147],{"class":2106},[501,2223,2111],{"class":2110},[501,2225,1430],{"class":562},[501,2227,2229,2231,2233],{"class":503,"line":2228},15,[501,2230,2156],{"class":2106},[501,2232,2111],{"class":2110},[501,2234,2161],{"class":562},[501,2236,2238,2240],{"class":503,"line":2237},16,[501,2239,2166],{"class":2106},[501,2241,2132],{"class":2110},[501,2243,2245,2247,2249],{"class":503,"line":2244},17,[501,2246,2173],{"class":2106},[501,2248,2111],{"class":2110},[501,2250,2178],{"class":562},[481,2252,2254],{"id":2253},"the-fluxcd-magic","The FluxCD Magic 🪄",[16,2256,2257],{},"We are using two powerful Flux capabilities:",[79,2259,2260],{},[37,2261,2262],{},"Listen to new images in a certian repository and given pattern",[41,2264,2266],{"className":2097,"code":2265,"language":2099,"meta":14,"style":14},"apiVersion: image.toolkit.fluxcd.io/v1beta1\nkind: ImagePolicy\nmetadata:\n  name: myapp\n  namespace: flux-system\nspec:\n  imageRepositoryRef:\n    name: myapp\n  policy:\n    semver:\n      range: 1.0.x\n",[48,2267,2268,2277,2286,2292,2301,2309,2316,2323,2332,2339,2346],{"__ignoreMap":14},[501,2269,2270,2272,2274],{"class":503,"line":504},[501,2271,2107],{"class":2106},[501,2273,2111],{"class":2110},[501,2275,2276],{"class":562}," image.toolkit.fluxcd.io/v1beta1\n",[501,2278,2279,2281,2283],{"class":503,"line":510},[501,2280,2119],{"class":2106},[501,2282,2111],{"class":2110},[501,2284,2285],{"class":562}," ImagePolicy\n",[501,2287,2288,2290],{"class":503,"line":516},[501,2289,2129],{"class":2106},[501,2291,2132],{"class":2110},[501,2293,2294,2296,2298],{"class":503,"line":1385},[501,2295,2137],{"class":2106},[501,2297,2111],{"class":2110},[501,2299,2300],{"class":562}," myapp\n",[501,2302,2303,2305,2307],{"class":503,"line":1394},[501,2304,2147],{"class":2106},[501,2306,2111],{"class":2110},[501,2308,1723],{"class":562},[501,2310,2311,2314],{"class":503,"line":1403},[501,2312,2313],{"class":2106},"spec",[501,2315,2132],{"class":2110},[501,2317,2318,2321],{"class":503,"line":1415},[501,2319,2320],{"class":2106},"  imageRepositoryRef",[501,2322,2132],{"class":2110},[501,2324,2325,2328,2330],{"class":503,"line":1423},[501,2326,2327],{"class":2106},"    name",[501,2329,2111],{"class":2110},[501,2331,2300],{"class":562},[501,2333,2334,2337],{"class":503,"line":1433},[501,2335,2336],{"class":2106},"  policy",[501,2338,2132],{"class":2110},[501,2340,2341,2344],{"class":503,"line":1442},[501,2342,2343],{"class":2106},"    semver",[501,2345,2132],{"class":2110},[501,2347,2348,2351,2353],{"class":503,"line":2050},[501,2349,2350],{"class":2106},"      range",[501,2352,2111],{"class":2110},[501,2354,2355],{"class":562}," 1.0.x\n",[41,2357,2359],{"className":2097,"code":2358,"language":2099,"meta":14,"style":14},"apiVersion: image.toolkit.fluxcd.io/v1beta1\nkind: ImageRepository\nmetadata:\n  name: myapp\n  namespace: flux-system\nspec:\n  image: devozs/myapp\n  interval: 1m0s\n\n",[48,2360,2361,2369,2378,2384,2392,2400,2406,2416],{"__ignoreMap":14},[501,2362,2363,2365,2367],{"class":503,"line":504},[501,2364,2107],{"class":2106},[501,2366,2111],{"class":2110},[501,2368,2276],{"class":562},[501,2370,2371,2373,2375],{"class":503,"line":510},[501,2372,2119],{"class":2106},[501,2374,2111],{"class":2110},[501,2376,2377],{"class":562}," ImageRepository\n",[501,2379,2380,2382],{"class":503,"line":516},[501,2381,2129],{"class":2106},[501,2383,2132],{"class":2110},[501,2385,2386,2388,2390],{"class":503,"line":1385},[501,2387,2137],{"class":2106},[501,2389,2111],{"class":2110},[501,2391,2300],{"class":562},[501,2393,2394,2396,2398],{"class":503,"line":1394},[501,2395,2147],{"class":2106},[501,2397,2111],{"class":2110},[501,2399,1723],{"class":562},[501,2401,2402,2404],{"class":503,"line":1403},[501,2403,2313],{"class":2106},[501,2405,2132],{"class":2110},[501,2407,2408,2411,2413],{"class":503,"line":1415},[501,2409,2410],{"class":2106},"  image",[501,2412,2111],{"class":2110},[501,2414,2415],{"class":562}," devozs/myapp\n",[501,2417,2418,2421,2423],{"class":503,"line":1423},[501,2419,2420],{"class":2106},"  interval",[501,2422,2111],{"class":2110},[501,2424,2425],{"class":562}," 1m0s\n",[41,2427,2429],{"className":549,"code":2428,"language":551,"meta":14,"style":14},"flux get image policy -A\nNAMESPACE   NAME    LATEST IMAGE        READY   MESSAGE                                                           \ndev         myapp   devozs/myapp:1.0.40 True    Latest image tag for 'devozs/myapp' updated from 1.0.39 to 1.0.40   \n\nflux get image repository   \nNAMESPACE   NAME    LAST SCAN                   SUSPENDED   READY   MESSAGE                        \ndev         myapp   2023-12-18T00:43:48+02:00   False       True    successful scan: found 41 tags  \n\n",[48,2430,2431,2446,2468,2520,2524,2537,2559],{"__ignoreMap":14},[501,2432,2433,2435,2437,2440,2443],{"class":503,"line":504},[501,2434,1849],{"class":558},[501,2436,1714],{"class":562},[501,2438,2439],{"class":562}," image",[501,2441,2442],{"class":562}," policy",[501,2444,2445],{"class":566}," -A\n",[501,2447,2448,2451,2454,2457,2460,2463,2465],{"class":503,"line":510},[501,2449,2450],{"class":558},"NAMESPACE",[501,2452,2453],{"class":562},"   NAME",[501,2455,2456],{"class":562},"    LATEST",[501,2458,2459],{"class":562}," IMAGE",[501,2461,2462],{"class":562},"        READY",[501,2464,1874],{"class":562},[501,2466,2467],{"class":1346},"                                                           \n",[501,2469,2470,2473,2476,2479,2482,2485,2487,2490,2493,2496,2499,2502,2505,2508,2511,2514,2517],{"class":503,"line":516},[501,2471,2472],{"class":558},"dev",[501,2474,2475],{"class":562},"         myapp",[501,2477,2478],{"class":562},"   devozs/myapp:1.0.40",[501,2480,2481],{"class":562}," True",[501,2483,2484],{"class":562},"    Latest",[501,2486,2439],{"class":562},[501,2488,2489],{"class":562}," tag",[501,2491,2492],{"class":562}," for",[501,2494,2495],{"class":1983}," '",[501,2497,2498],{"class":562},"devozs/myapp",[501,2500,2501],{"class":1983},"'",[501,2503,2504],{"class":562}," updated",[501,2506,2507],{"class":562}," from",[501,2509,2510],{"class":1576}," 1.0.39",[501,2512,2513],{"class":562}," to",[501,2515,2516],{"class":1576}," 1.0.40",[501,2518,2519],{"class":1346},"   \n",[501,2521,2522],{"class":503,"line":1385},[501,2523,1728],{"emptyLinePlaceholder":757},[501,2525,2526,2528,2530,2532,2535],{"class":503,"line":1394},[501,2527,1849],{"class":558},[501,2529,1714],{"class":562},[501,2531,2439],{"class":562},[501,2533,2534],{"class":562}," repository",[501,2536,2519],{"class":1346},[501,2538,2539,2541,2543,2546,2549,2552,2554,2556],{"class":503,"line":1403},[501,2540,2450],{"class":558},[501,2542,2453],{"class":562},[501,2544,2545],{"class":562},"    LAST",[501,2547,2548],{"class":562}," SCAN",[501,2550,2551],{"class":562},"                   SUSPENDED",[501,2553,1871],{"class":562},[501,2555,1874],{"class":562},[501,2557,2558],{"class":1346},"                        \n",[501,2560,2561,2563,2565,2568,2571,2573,2576,2579,2582,2585],{"class":503,"line":1415},[501,2562,2472],{"class":558},[501,2564,2475],{"class":562},[501,2566,2567],{"class":562},"   2023-12-18T00:43:48+02:00",[501,2569,2570],{"class":562},"   False",[501,2572,1890],{"class":562},[501,2574,2575],{"class":562},"    successful",[501,2577,2578],{"class":562}," scan:",[501,2580,2581],{"class":562}," found",[501,2583,2584],{"class":1576}," 41",[501,2586,2587],{"class":562}," tags\n",[79,2589,2590],{},[37,2591,2592],{},"Update the resolved image tag in the relevant Kubernetes yaml (directly to the Deployment YAML or vie Kustomization YAML)",[41,2594,2596],{"className":2097,"code":2595,"language":2099,"meta":14,"style":14},"apiVersion: image.toolkit.fluxcd.io/v1beta1\nkind: ImageUpdateAutomation\nmetadata:\n  name: image-update-automation\n  namespace: flux-system\nspec:\n  interval: 1m10s\n  sourceRef:\n    kind: GitRepository\n    name: flux-system\n  git:\n    checkout:\n      ref:\n        branch: main\n    commit:\n      author:\n        email: fluxcdbot@users.noreply.github.com\n        name: fluxcdbot\n      messageTemplate: '{{range .Updated.Images}}{{println .}}{{end}}'\n    push:\n      branch: main\n  update:\n    path: ./gitops/clusters/dev\n    strategy: Setters\n",[48,2597,2598,2606,2615,2621,2630,2638,2644,2653,2660,2670,2678,2685,2692,2699,2709,2716,2723,2733,2744,2760,2768,2778,2786,2797],{"__ignoreMap":14},[501,2599,2600,2602,2604],{"class":503,"line":504},[501,2601,2107],{"class":2106},[501,2603,2111],{"class":2110},[501,2605,2276],{"class":562},[501,2607,2608,2610,2612],{"class":503,"line":510},[501,2609,2119],{"class":2106},[501,2611,2111],{"class":2110},[501,2613,2614],{"class":562}," ImageUpdateAutomation\n",[501,2616,2617,2619],{"class":503,"line":516},[501,2618,2129],{"class":2106},[501,2620,2132],{"class":2110},[501,2622,2623,2625,2627],{"class":503,"line":1385},[501,2624,2137],{"class":2106},[501,2626,2111],{"class":2110},[501,2628,2629],{"class":562}," image-update-automation\n",[501,2631,2632,2634,2636],{"class":503,"line":1394},[501,2633,2147],{"class":2106},[501,2635,2111],{"class":2110},[501,2637,1723],{"class":562},[501,2639,2640,2642],{"class":503,"line":1403},[501,2641,2313],{"class":2106},[501,2643,2132],{"class":2110},[501,2645,2646,2648,2650],{"class":503,"line":1415},[501,2647,2420],{"class":2106},[501,2649,2111],{"class":2110},[501,2651,2652],{"class":562}," 1m10s\n",[501,2654,2655,2658],{"class":503,"line":1423},[501,2656,2657],{"class":2106},"  sourceRef",[501,2659,2132],{"class":2110},[501,2661,2662,2665,2667],{"class":503,"line":1433},[501,2663,2664],{"class":2106},"    kind",[501,2666,2111],{"class":2110},[501,2668,2669],{"class":562}," GitRepository\n",[501,2671,2672,2674,2676],{"class":503,"line":1442},[501,2673,2327],{"class":2106},[501,2675,2111],{"class":2110},[501,2677,1723],{"class":562},[501,2679,2680,2683],{"class":503,"line":2050},[501,2681,2682],{"class":2106},"  git",[501,2684,2132],{"class":2110},[501,2686,2687,2690],{"class":503,"line":2203},[501,2688,2689],{"class":2106},"    checkout",[501,2691,2132],{"class":2110},[501,2693,2694,2697],{"class":503,"line":2210},[501,2695,2696],{"class":2106},"      ref",[501,2698,2132],{"class":2110},[501,2700,2701,2704,2706],{"class":503,"line":2219},[501,2702,2703],{"class":2106},"        branch",[501,2705,2111],{"class":2110},[501,2707,2708],{"class":562}," main\n",[501,2710,2711,2714],{"class":503,"line":2228},[501,2712,2713],{"class":2106},"    commit",[501,2715,2132],{"class":2110},[501,2717,2718,2721],{"class":503,"line":2237},[501,2719,2720],{"class":2106},"      author",[501,2722,2132],{"class":2110},[501,2724,2725,2728,2730],{"class":503,"line":2244},[501,2726,2727],{"class":2106},"        email",[501,2729,2111],{"class":2110},[501,2731,2732],{"class":562}," fluxcdbot@users.noreply.github.com\n",[501,2734,2736,2739,2741],{"class":503,"line":2735},18,[501,2737,2738],{"class":2106},"        name",[501,2740,2111],{"class":2110},[501,2742,2743],{"class":562}," fluxcdbot\n",[501,2745,2747,2750,2752,2754,2757],{"class":503,"line":2746},19,[501,2748,2749],{"class":2106},"      messageTemplate",[501,2751,2111],{"class":2110},[501,2753,2495],{"class":1983},[501,2755,2756],{"class":562},"{{range .Updated.Images}}{{println .}}{{end}}",[501,2758,2759],{"class":1983},"'\n",[501,2761,2763,2766],{"class":503,"line":2762},20,[501,2764,2765],{"class":2106},"    push",[501,2767,2132],{"class":2110},[501,2769,2771,2774,2776],{"class":503,"line":2770},21,[501,2772,2773],{"class":2106},"      branch",[501,2775,2111],{"class":2110},[501,2777,2708],{"class":562},[501,2779,2781,2784],{"class":503,"line":2780},22,[501,2782,2783],{"class":2106},"  update",[501,2785,2132],{"class":2110},[501,2787,2789,2792,2794],{"class":503,"line":2788},23,[501,2790,2791],{"class":2106},"    path",[501,2793,2111],{"class":2110},[501,2795,2796],{"class":562}," ./gitops/clusters/dev\n",[501,2798,2800,2803,2805],{"class":503,"line":2799},24,[501,2801,2802],{"class":2106},"    strategy",[501,2804,2111],{"class":2110},[501,2806,2807],{"class":562}," Setters\n",[725,2809,2810],{},"html pre.shiki code .sNHwn, html code.shiki .sNHwn{--shiki-default:#88C0D0;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .siq7d, html code.shiki .siq7d{--shiki-default:#A3BE8C;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sw3Zv, html code.shiki .sw3Zv{--shiki-default:#D8DEE9FF;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .sCWj5, html code.shiki .sCWj5{--shiki-default:#88C0D0;--shiki-dark:#79B8FF;--shiki-sepia:#66D9EF}html pre.shiki code .sqTyp, html code.shiki .sqTyp{--shiki-default:#A3BE8C;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .sX_qU, html code.shiki .sX_qU{--shiki-default:#B48EAD;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .s4BcI, html code.shiki .s4BcI{--shiki-default:#81A1C1;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .sn_7u, html code.shiki .sn_7u{--shiki-default:#D8DEE9;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sQE_P, html code.shiki .sQE_P{--shiki-default:#ECEFF4;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .skFRX, html code.shiki .skFRX{--shiki-default:#8FBCBB;--shiki-dark:#85E89D;--shiki-sepia:#F92672}html pre.shiki code .sUaCP, html code.shiki .sUaCP{--shiki-default:#ECEFF4;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .siby6, html code.shiki .siby6{--shiki-default:#D8DEE9FF;--shiki-dark:#B392F0;--shiki-sepia:#F8F8F2}",{"title":14,"searchDepth":510,"depth":510,"links":2812},[2813,2814,2817],{"id":1246,"depth":510,"text":1247},{"id":1278,"depth":510,"text":1279,"children":2815},[2816],{"id":1450,"depth":516,"text":1451},{"id":1472,"depth":510,"text":1536,"children":2818},[2819,2820,2821,2822,2823,2824,2825,2826],{"id":1550,"depth":516,"text":1551},{"id":1605,"depth":516,"text":1606},{"id":1691,"depth":516,"text":1692},{"id":1835,"depth":516,"text":1836},{"id":1924,"depth":516,"text":1925},{"id":2058,"depth":516,"text":2059},{"id":2082,"depth":516,"text":2083},{"id":2253,"depth":516,"text":2254},"2023-12-17T08:00:00.000Z","GitOps, CD, Deployment, FluxCD, GitHub, Helm",{"published":757},"/blog/2023/12/17/ci-cd-github-actions-flux-helm",{"title":1230,"description":1235},"ci-cd-github-actions-flux-helm","blog/2023/12/17/ci-cd-github-actions-flux-helm",[2835,2836,1536,1225,2837,2838],"GitOps","CD","GitHub","Helm","SG8llZBvfzEOyOM0OvjiCxhkwt7qRbDxYBC6X4od99U",{"id":2841,"title":2842,"author":7,"body":2843,"cover":1211,"date":5491,"description":2847,"draft":752,"excerpt":753,"extension":754,"github":2854,"keywords":5492,"meta":5493,"navigation":757,"path":5494,"seo":5495,"shortDesc":753,"slug":5496,"stem":5497,"tags":5498,"video":753,"__hash__":5499},"blog/blog/2023/09/10/continuence-deployment-flux.md","Continuences Deployment FluxCD",{"type":9,"value":2844,"toc":5473},[2845,2848,2856,2858,2861,2864,2875,2878,2885,2887,2892,2895,2897,2962,2966,3004,3007,3067,3081,3098,3101,3667,3669,3675,3779,3781,3783,3895,3898,3998,4000,4008,4019,4021,4024,4031,4161,4165,4168,4177,4326,4330,4333,4381,4396,4398,4400,4404,4526,4607,4733,4737,4917,4995,5009,5267,5271,5291,5293,5351,5354,5363,5371,5470],[16,2846,2847],{},"In the upcoming blog post, we will implement continuous deployment with some GitOps characteristics, using this web application and AKS as our foundation.",[12,2849,2850],{"type":14},[16,2851,2852],{},[19,2853,24],{"href":2854,"rel":2855},"https://github.com/devozs/blog-deployment/tree/main/gitops",[23],[29,2857,1247],{"id":1246},[16,2859,2860],{},"In the previous tutorials, we set up the infrastructure (AKS via Terraform) and created a continuous integration workflow that builds a Node.js web application, containerizes it, and pushes the image to a container registry.",[16,2862,2863],{},"The key GitOps principles we aim to illustrate include:",[79,2865,2866,2869,2872],{},[37,2867,2868],{},"Storing deployment manifests in a Git repository.",[37,2870,2871],{},"Reconciling, pulling and applying changes within Kubernetes, rather than externally pushing changes into Kubernetes from a CD pipeline.",[37,2873,2874],{},"listen to new image versions and update the relevant manifet with the updated tag.",[16,2876,2877],{},"To accomplish this, we'll leverage FluxCD as our chosen GitOps tool. Within FluxCD, we will make use of several automation capabilities, including image policies, image automation, and more.",[12,2879,2880],{"type":1267},[16,2881,1270,2882],{},[19,2883,1275],{"href":1273,"rel":2884},[23],[29,2886,1279],{"id":1278},[16,2888,1282,2889,1288],{},[19,2890,1287],{"href":1285,"rel":2891},[23],[16,2893,2894],{},"This is what our repository looks like (made small changes in compare to FluxCD monorepo. Later on, after the setup and bootstraping, we will delve into various kustomizations and their correlation with the repository structure",[16,2896,1330],{},[41,2898,2900],{"className":549,"code":2899,"language":551,"meta":14,"style":14},"├── apps\n│   ├── base\n│   └── dev\n├── infrastructure\n│   ├── config\n│   └── controllers\n└── clusters\n    └── dev\n",[48,2901,2902,2908,2918,2926,2932,2941,2950,2956],{"__ignoreMap":14},[501,2903,2904,2906],{"class":503,"line":504},[501,2905,1340],{"class":558},[501,2907,1400],{"class":562},[501,2909,2910,2913,2916],{"class":503,"line":510},[501,2911,2912],{"class":558},"│",[501,2914,2915],{"class":562},"   ├──",[501,2917,1412],{"class":562},[501,2919,2920,2922,2924],{"class":503,"line":516},[501,2921,2912],{"class":558},[501,2923,1409],{"class":562},[501,2925,1430],{"class":562},[501,2927,2928,2930],{"class":503,"line":1385},[501,2929,1340],{"class":558},[501,2931,1420],{"class":562},[501,2933,2934,2936,2938],{"class":503,"line":1394},[501,2935,2912],{"class":558},[501,2937,2915],{"class":562},[501,2939,2940],{"class":562}," config\n",[501,2942,2943,2945,2947],{"class":503,"line":1403},[501,2944,2912],{"class":558},[501,2946,1409],{"class":562},[501,2948,2949],{"class":562}," controllers\n",[501,2951,2952,2954],{"class":503,"line":1415},[501,2953,1363],{"class":558},[501,2955,1439],{"class":562},[501,2957,2958,2960],{"class":503,"line":1423},[501,2959,1388],{"class":558},[501,2961,1430],{"class":562},[29,2963,2965],{"id":2964},"bootstraping-flux","Bootstraping Flux",[12,2967,2968,2971],{"type":48},[16,2969,2970],{},"Make sure you are using the right kubectl context!",[1618,2972,2973,2976],{"v-slot:details":14},[16,2974,2975],{},"For example in case you are using Azure AKS:",[41,2977,2979],{"className":549,"code":2978,"language":551,"meta":14,"style":14},"az aks get-credentials --resource-group rg-k8s-dev --name aks-dev\n",[48,2980,2981],{"__ignoreMap":14},[501,2982,2983,2986,2989,2992,2995,2998,3001],{"class":503,"line":504},[501,2984,2985],{"class":558},"az",[501,2987,2988],{"class":562}," aks",[501,2990,2991],{"class":562}," get-credentials",[501,2993,2994],{"class":566}," --resource-group",[501,2996,2997],{"class":562}," rg-k8s-dev",[501,2999,3000],{"class":566}," --name",[501,3002,3003],{"class":562}," aks-dev\n",[16,3005,3006],{},"Verify cluster readiness:",[41,3008,3010],{"className":549,"code":3009,"language":551,"meta":14,"style":14},"flux check --pre\n\n► checking prerequisites\n✔ Kubernetes 1.25.12 >=1.20.6-0\n✔ prerequisites checks passed\n",[48,3011,3012,3022,3026,3037,3054],{"__ignoreMap":14},[501,3013,3014,3016,3019],{"class":503,"line":504},[501,3015,1849],{"class":558},[501,3017,3018],{"class":562}," check",[501,3020,3021],{"class":566}," --pre\n",[501,3023,3024],{"class":503,"line":510},[501,3025,1728],{"emptyLinePlaceholder":757},[501,3027,3028,3031,3034],{"class":503,"line":516},[501,3029,3030],{"class":558},"►",[501,3032,3033],{"class":562}," checking",[501,3035,3036],{"class":562}," prerequisites\n",[501,3038,3039,3042,3045,3048,3051],{"class":503,"line":1385},[501,3040,3041],{"class":558},"✔",[501,3043,3044],{"class":562}," Kubernetes",[501,3046,3047],{"class":1576}," 1.25.12",[501,3049,3050],{"class":1640}," >",[501,3052,3053],{"class":562},"=1.20.6-0\n",[501,3055,3056,3058,3061,3064],{"class":503,"line":1394},[501,3057,3041],{"class":558},[501,3059,3060],{"class":562}," prerequisites",[501,3062,3063],{"class":562}," checks",[501,3065,3066],{"class":562}," passed\n",[12,3068,3069,3074],{"type":1267},[16,3070,1611,3071],{},[19,3072,1616],{"href":1614,"rel":3073},[23],[1618,3075,3076],{"v-slot:details":14},[16,3077,1622,3078],{},[19,3079,1627],{"href":1625,"rel":3080},[23],[41,3082,3084],{"className":549,"code":3083,"language":551,"meta":14,"style":14},"export GITHUB_TOKEN=\u003CYOUR_PAT>\n",[48,3085,3086],{"__ignoreMap":14},[501,3087,3088,3090,3092,3094,3096],{"class":503,"line":504},[501,3089,1641],{"class":1640},[501,3091,1645],{"class":1644},[501,3093,1648],{"class":1640},[501,3095,1651],{"class":1644},[501,3097,1654],{"class":1640},[16,3099,3100],{},"Start the bootstrap (Flux will create the repository for you incase it doesnt exists):",[41,3102,3104],{"className":549,"code":3103,"language":551,"meta":14,"style":14},"flux bootstrap github --read-write-key --owner=\u003CYOUR_ORG> --repository=blog-deployment --branch=main --path=gitops/clusters/dev --components-extra=image-reflector-controller,image-automation-controller\n\n    Message:\n    ► connecting to github.com\n    ► cloning branch \"main\" from Git repository \"https://github.com/devozs/blog-deployment.git\"\n    ✔ cloned repository\n    ► generating component manifests\n    ✔ generated component manifests\n    ✔ committed sync manifests to \"main\" (\"e65db7e29d592c016a8f82271a577e6b6c0b2935\")\n    ► pushing component manifests to \"https://github.com/devozs/blog-deployment.git\"\n    ► installing components in \"flux-system\" namespace\n    ✔ installed components\n    ✔ reconciled components\n    ► determining if source secret \"flux-system/flux-system\" exists\n    ► generating source secret\n    ✔ public key: ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBNOHqQkmVLEVGXn9IiiOAuHkv8/Je0lFGdrCJAccUHYalIDiDOF9CKFxLFXvpTtIePVS3kshJRnfNKfwFVqYdEWTP0xHm7KXSv4dwZZgf011FdYBv4JSSujIhv8m31qu1A==\n    ✔ configured deploy key \"flux-system-main-flux-system-./gitops/clusters/dev\" for \"https://github.com/devozs/blog-deployment\"\n    ► applying source secret \"flux-system/flux-system\"\n    ✔ reconciled source secret\n    ► generating sync manifests\n    ✔ generated sync manifests\n    ✔ committed sync manifests to \"main\" (\"9e14f895a4916fad884ffbe564c049e72f1ecd58\")\n    ► pushing sync manifests to \"https://github.com/devozs/blog-deployment.git\"\n    ► applying sync manifests\n    ✔ reconciled sync configuration\n    ◎ waiting for Kustomization \"flux-system/flux-system\" to be reconciled\n    ✔ Kustomization reconciled successfully\n    ► confirming components are healthy\n    ✔ helm-controller: deployment ready\n    ✔ image-automation-controller: deployment ready\n    ✔ image-reflector-controller: deployment ready\n    ✔ kustomize-controller: deployment ready\n    ✔ notification-controller: deployment ready\n    ✔ source-controller: deployment ready\n    ✔ all components are healthy\n",[48,3105,3106,3143,3147,3152,3165,3197,3208,3221,3232,3265,3284,3306,3316,3325,3351,3362,3378,3407,3424,3434,3444,3454,3483,3501,3511,3523,3551,3563,3579,3593,3605,3617,3629,3641,3653],{"__ignoreMap":14},[501,3107,3108,3110,3113,3116,3119,3122,3125,3128,3131,3134,3137,3140],{"class":503,"line":504},[501,3109,1849],{"class":558},[501,3111,3112],{"class":562}," bootstrap",[501,3114,3115],{"class":562}," github",[501,3117,3118],{"class":566}," --read-write-key",[501,3120,3121],{"class":566}," --owner=",[501,3123,3124],{"class":1640},"\u003C",[501,3126,3127],{"class":566},"YOUR_ORG",[501,3129,3130],{"class":1640},">",[501,3132,3133],{"class":566}," --repository=blog-deployment",[501,3135,3136],{"class":566}," --branch=main",[501,3138,3139],{"class":566}," --path=gitops/clusters/dev",[501,3141,3142],{"class":566}," --components-extra=image-reflector-controller,image-automation-controller\n",[501,3144,3145],{"class":503,"line":510},[501,3146,1728],{"emptyLinePlaceholder":757},[501,3148,3149],{"class":503,"line":516},[501,3150,3151],{"class":558},"    Message:\n",[501,3153,3154,3157,3160,3162],{"class":503,"line":1385},[501,3155,3156],{"class":558},"    ►",[501,3158,3159],{"class":562}," connecting",[501,3161,2513],{"class":562},[501,3163,3164],{"class":562}," github.com\n",[501,3166,3167,3169,3172,3175,3177,3180,3182,3184,3187,3189,3191,3194],{"class":503,"line":1394},[501,3168,3156],{"class":558},[501,3170,3171],{"class":562}," cloning",[501,3173,3174],{"class":562}," branch",[501,3176,1984],{"class":1983},[501,3178,3179],{"class":562},"main",[501,3181,1990],{"class":1983},[501,3183,2507],{"class":562},[501,3185,3186],{"class":562}," Git",[501,3188,2534],{"class":562},[501,3190,1984],{"class":1983},[501,3192,3193],{"class":562},"https://github.com/devozs/blog-deployment.git",[501,3195,3196],{"class":1983},"\"\n",[501,3198,3199,3202,3205],{"class":503,"line":1403},[501,3200,3201],{"class":558},"    ✔",[501,3203,3204],{"class":562}," cloned",[501,3206,3207],{"class":562}," repository\n",[501,3209,3210,3212,3215,3218],{"class":503,"line":1415},[501,3211,3156],{"class":558},[501,3213,3214],{"class":562}," generating",[501,3216,3217],{"class":562}," component",[501,3219,3220],{"class":562}," manifests\n",[501,3222,3223,3225,3228,3230],{"class":503,"line":1423},[501,3224,3201],{"class":558},[501,3226,3227],{"class":562}," generated",[501,3229,3217],{"class":562},[501,3231,3220],{"class":562},[501,3233,3234,3236,3239,3242,3245,3247,3249,3251,3253,3256,3258,3261,3263],{"class":503,"line":1433},[501,3235,3201],{"class":558},[501,3237,3238],{"class":562}," committed",[501,3240,3241],{"class":562}," sync",[501,3243,3244],{"class":562}," manifests",[501,3246,2513],{"class":562},[501,3248,1984],{"class":1983},[501,3250,3179],{"class":562},[501,3252,1990],{"class":1983},[501,3254,3255],{"class":1346}," (",[501,3257,1990],{"class":1983},[501,3259,3260],{"class":562},"e65db7e29d592c016a8f82271a577e6b6c0b2935",[501,3262,1990],{"class":1983},[501,3264,805],{"class":1346},[501,3266,3267,3269,3272,3274,3276,3278,3280,3282],{"class":503,"line":1442},[501,3268,3156],{"class":558},[501,3270,3271],{"class":562}," pushing",[501,3273,3217],{"class":562},[501,3275,3244],{"class":562},[501,3277,2513],{"class":562},[501,3279,1984],{"class":1983},[501,3281,3193],{"class":562},[501,3283,3196],{"class":1983},[501,3285,3286,3288,3291,3294,3297,3299,3301,3303],{"class":503,"line":2050},[501,3287,3156],{"class":558},[501,3289,3290],{"class":562}," installing",[501,3292,3293],{"class":562}," components",[501,3295,3296],{"class":562}," in",[501,3298,1984],{"class":1983},[501,3300,1700],{"class":562},[501,3302,1990],{"class":1983},[501,3304,3305],{"class":562}," namespace\n",[501,3307,3308,3310,3313],{"class":503,"line":2203},[501,3309,3201],{"class":558},[501,3311,3312],{"class":562}," installed",[501,3314,3315],{"class":562}," components\n",[501,3317,3318,3320,3323],{"class":503,"line":2210},[501,3319,3201],{"class":558},[501,3321,3322],{"class":562}," reconciled",[501,3324,3315],{"class":562},[501,3326,3327,3329,3332,3335,3338,3341,3343,3346,3348],{"class":503,"line":2219},[501,3328,3156],{"class":558},[501,3330,3331],{"class":562}," determining",[501,3333,3334],{"class":562}," if",[501,3336,3337],{"class":562}," source",[501,3339,3340],{"class":562}," secret",[501,3342,1984],{"class":1983},[501,3344,3345],{"class":562},"flux-system/flux-system",[501,3347,1990],{"class":1983},[501,3349,3350],{"class":562}," exists\n",[501,3352,3353,3355,3357,3359],{"class":503,"line":2228},[501,3354,3156],{"class":558},[501,3356,3214],{"class":562},[501,3358,3337],{"class":562},[501,3360,3361],{"class":562}," secret\n",[501,3363,3364,3366,3369,3372,3375],{"class":503,"line":2237},[501,3365,3201],{"class":558},[501,3367,3368],{"class":562}," public",[501,3370,3371],{"class":562}," key:",[501,3373,3374],{"class":562}," ecdsa-sha2-nistp384",[501,3376,3377],{"class":562}," AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBNOHqQkmVLEVGXn9IiiOAuHkv8/Je0lFGdrCJAccUHYalIDiDOF9CKFxLFXvpTtIePVS3kshJRnfNKfwFVqYdEWTP0xHm7KXSv4dwZZgf011FdYBv4JSSujIhv8m31qu1A==\n",[501,3379,3380,3382,3385,3388,3391,3393,3396,3398,3400,3402,3405],{"class":503,"line":2244},[501,3381,3201],{"class":558},[501,3383,3384],{"class":562}," configured",[501,3386,3387],{"class":562}," deploy",[501,3389,3390],{"class":562}," key",[501,3392,1984],{"class":1983},[501,3394,3395],{"class":562},"flux-system-main-flux-system-./gitops/clusters/dev",[501,3397,1990],{"class":1983},[501,3399,2492],{"class":562},[501,3401,1984],{"class":1983},[501,3403,3404],{"class":562},"https://github.com/devozs/blog-deployment",[501,3406,3196],{"class":1983},[501,3408,3409,3411,3414,3416,3418,3420,3422],{"class":503,"line":2735},[501,3410,3156],{"class":558},[501,3412,3413],{"class":562}," applying",[501,3415,3337],{"class":562},[501,3417,3340],{"class":562},[501,3419,1984],{"class":1983},[501,3421,3345],{"class":562},[501,3423,3196],{"class":1983},[501,3425,3426,3428,3430,3432],{"class":503,"line":2746},[501,3427,3201],{"class":558},[501,3429,3322],{"class":562},[501,3431,3337],{"class":562},[501,3433,3361],{"class":562},[501,3435,3436,3438,3440,3442],{"class":503,"line":2762},[501,3437,3156],{"class":558},[501,3439,3214],{"class":562},[501,3441,3241],{"class":562},[501,3443,3220],{"class":562},[501,3445,3446,3448,3450,3452],{"class":503,"line":2770},[501,3447,3201],{"class":558},[501,3449,3227],{"class":562},[501,3451,3241],{"class":562},[501,3453,3220],{"class":562},[501,3455,3456,3458,3460,3462,3464,3466,3468,3470,3472,3474,3476,3479,3481],{"class":503,"line":2780},[501,3457,3201],{"class":558},[501,3459,3238],{"class":562},[501,3461,3241],{"class":562},[501,3463,3244],{"class":562},[501,3465,2513],{"class":562},[501,3467,1984],{"class":1983},[501,3469,3179],{"class":562},[501,3471,1990],{"class":1983},[501,3473,3255],{"class":1346},[501,3475,1990],{"class":1983},[501,3477,3478],{"class":562},"9e14f895a4916fad884ffbe564c049e72f1ecd58",[501,3480,1990],{"class":1983},[501,3482,805],{"class":1346},[501,3484,3485,3487,3489,3491,3493,3495,3497,3499],{"class":503,"line":2788},[501,3486,3156],{"class":558},[501,3488,3271],{"class":562},[501,3490,3241],{"class":562},[501,3492,3244],{"class":562},[501,3494,2513],{"class":562},[501,3496,1984],{"class":1983},[501,3498,3193],{"class":562},[501,3500,3196],{"class":1983},[501,3502,3503,3505,3507,3509],{"class":503,"line":2799},[501,3504,3156],{"class":558},[501,3506,3413],{"class":562},[501,3508,3241],{"class":562},[501,3510,3220],{"class":562},[501,3512,3514,3516,3518,3520],{"class":503,"line":3513},25,[501,3515,3201],{"class":558},[501,3517,3322],{"class":562},[501,3519,3241],{"class":562},[501,3521,3522],{"class":562}," configuration\n",[501,3524,3526,3529,3532,3534,3537,3539,3541,3543,3545,3548],{"class":503,"line":3525},26,[501,3527,3528],{"class":558},"    ◎",[501,3530,3531],{"class":562}," waiting",[501,3533,2492],{"class":562},[501,3535,3536],{"class":562}," Kustomization",[501,3538,1984],{"class":1983},[501,3540,3345],{"class":562},[501,3542,1990],{"class":1983},[501,3544,2513],{"class":562},[501,3546,3547],{"class":562}," be",[501,3549,3550],{"class":562}," reconciled\n",[501,3552,3554,3556,3558,3560],{"class":503,"line":3553},27,[501,3555,3201],{"class":558},[501,3557,3536],{"class":562},[501,3559,3322],{"class":562},[501,3561,3562],{"class":562}," successfully\n",[501,3564,3566,3568,3571,3573,3576],{"class":503,"line":3565},28,[501,3567,3156],{"class":558},[501,3569,3570],{"class":562}," confirming",[501,3572,3293],{"class":562},[501,3574,3575],{"class":562}," are",[501,3577,3578],{"class":562}," healthy\n",[501,3580,3582,3584,3587,3590],{"class":503,"line":3581},29,[501,3583,3201],{"class":558},[501,3585,3586],{"class":562}," helm-controller:",[501,3588,3589],{"class":562}," deployment",[501,3591,3592],{"class":562}," ready\n",[501,3594,3596,3598,3601,3603],{"class":503,"line":3595},30,[501,3597,3201],{"class":558},[501,3599,3600],{"class":562}," image-automation-controller:",[501,3602,3589],{"class":562},[501,3604,3592],{"class":562},[501,3606,3608,3610,3613,3615],{"class":503,"line":3607},31,[501,3609,3201],{"class":558},[501,3611,3612],{"class":562}," image-reflector-controller:",[501,3614,3589],{"class":562},[501,3616,3592],{"class":562},[501,3618,3620,3622,3625,3627],{"class":503,"line":3619},32,[501,3621,3201],{"class":558},[501,3623,3624],{"class":562}," kustomize-controller:",[501,3626,3589],{"class":562},[501,3628,3592],{"class":562},[501,3630,3632,3634,3637,3639],{"class":503,"line":3631},33,[501,3633,3201],{"class":558},[501,3635,3636],{"class":562}," notification-controller:",[501,3638,3589],{"class":562},[501,3640,3592],{"class":562},[501,3642,3644,3646,3649,3651],{"class":503,"line":3643},34,[501,3645,3201],{"class":558},[501,3647,3648],{"class":562}," source-controller:",[501,3650,3589],{"class":562},[501,3652,3592],{"class":562},[501,3654,3656,3658,3661,3663,3665],{"class":503,"line":3655},35,[501,3657,3201],{"class":558},[501,3659,3660],{"class":562}," all",[501,3662,3293],{"class":562},[501,3664,3575],{"class":562},[501,3666,3578],{"class":562},[481,3668,1692],{"id":1691},[16,3670,1695,3671,1701],{},[1456,3672,3673],{},[674,3674,1700],{},[41,3676,3677],{"className":549,"code":1704,"language":551,"meta":14,"style":14},[48,3678,3679,3691,3695,3707,3719,3731,3743,3755,3767],{"__ignoreMap":14},[501,3680,3681,3683,3685,3687,3689],{"class":503,"line":504},[501,3682,1711],{"class":558},[501,3684,1714],{"class":562},[501,3686,1717],{"class":562},[501,3688,1720],{"class":566},[501,3690,1723],{"class":562},[501,3692,3693],{"class":503,"line":510},[501,3694,1728],{"emptyLinePlaceholder":757},[501,3696,3697,3699,3701,3703,3705],{"class":503,"line":516},[501,3698,1733],{"class":558},[501,3700,1736],{"class":562},[501,3702,1739],{"class":562},[501,3704,1742],{"class":562},[501,3706,1745],{"class":562},[501,3708,3709,3711,3713,3715,3717],{"class":503,"line":1385},[501,3710,1750],{"class":558},[501,3712,1753],{"class":562},[501,3714,1756],{"class":562},[501,3716,1759],{"class":1576},[501,3718,1762],{"class":562},[501,3720,3721,3723,3725,3727,3729],{"class":503,"line":1394},[501,3722,1767],{"class":558},[501,3724,1770],{"class":562},[501,3726,1756],{"class":562},[501,3728,1759],{"class":1576},[501,3730,1762],{"class":562},[501,3732,3733,3735,3737,3739,3741],{"class":503,"line":1403},[501,3734,1781],{"class":558},[501,3736,1784],{"class":562},[501,3738,1756],{"class":562},[501,3740,1759],{"class":1576},[501,3742,1762],{"class":562},[501,3744,3745,3747,3749,3751,3753],{"class":503,"line":1415},[501,3746,1795],{"class":558},[501,3748,1798],{"class":562},[501,3750,1756],{"class":562},[501,3752,1759],{"class":1576},[501,3754,1762],{"class":562},[501,3756,3757,3759,3761,3763,3765],{"class":503,"line":1423},[501,3758,1809],{"class":558},[501,3760,1812],{"class":562},[501,3762,1756],{"class":562},[501,3764,1759],{"class":1576},[501,3766,1762],{"class":562},[501,3768,3769,3771,3773,3775,3777],{"class":503,"line":1433},[501,3770,1823],{"class":558},[501,3772,1826],{"class":562},[501,3774,1756],{"class":562},[501,3776,1759],{"class":1576},[501,3778,1762],{"class":562},[481,3780,1836],{"id":1835},[16,3782,1839],{},[41,3784,3786],{"className":549,"code":3785,"language":551,"meta":14,"style":14},"flux get kustomizations\n\nNAME                REVISION            SUSPENDED   READY   MESSAGE                              \napps                main@sha1:45260107  False       True    Applied revision: main@sha1:45260107    \nflux-system         main@sha1:45260107  False       True    Applied revision: main@sha1:45260107    \ninfra-configs       main@sha1:45260107  False       True    Applied revision: main@sha1:45260107    \ninfra-controllers   main@sha1:45260107  False       True    Applied revision: main@sha1:45260107    \n",[48,3787,3788,3796,3800,3814,3837,3856,3876],{"__ignoreMap":14},[501,3789,3790,3792,3794],{"class":503,"line":504},[501,3791,1849],{"class":558},[501,3793,1714],{"class":562},[501,3795,1854],{"class":562},[501,3797,3798],{"class":503,"line":510},[501,3799,1728],{"emptyLinePlaceholder":757},[501,3801,3802,3804,3806,3808,3810,3812],{"class":503,"line":516},[501,3803,1733],{"class":558},[501,3805,1865],{"class":562},[501,3807,1868],{"class":562},[501,3809,1871],{"class":562},[501,3811,1874],{"class":562},[501,3813,1877],{"class":1346},[501,3815,3816,3819,3822,3825,3827,3829,3831,3834],{"class":503,"line":1385},[501,3817,3818],{"class":558},"apps",[501,3820,3821],{"class":562},"                main@sha1:45260107",[501,3823,3824],{"class":562},"  False",[501,3826,1890],{"class":562},[501,3828,1893],{"class":562},[501,3830,1896],{"class":562},[501,3832,3833],{"class":562}," main@sha1:45260107",[501,3835,3836],{"class":1346},"    \n",[501,3838,3839,3841,3844,3846,3848,3850,3852,3854],{"class":503,"line":1394},[501,3840,1700],{"class":558},[501,3842,3843],{"class":562},"         main@sha1:45260107",[501,3845,3824],{"class":562},[501,3847,1890],{"class":562},[501,3849,1893],{"class":562},[501,3851,1896],{"class":562},[501,3853,3833],{"class":562},[501,3855,3836],{"class":1346},[501,3857,3858,3861,3864,3866,3868,3870,3872,3874],{"class":503,"line":1403},[501,3859,3860],{"class":558},"infra-configs",[501,3862,3863],{"class":562},"       main@sha1:45260107",[501,3865,3824],{"class":562},[501,3867,1890],{"class":562},[501,3869,1893],{"class":562},[501,3871,1896],{"class":562},[501,3873,3833],{"class":562},[501,3875,3836],{"class":1346},[501,3877,3878,3881,3884,3886,3888,3890,3892],{"class":503,"line":1415},[501,3879,3880],{"class":558},"infra-controllers",[501,3882,3883],{"class":562},"   main@sha1:45260107",[501,3885,3824],{"class":562},[501,3887,1890],{"class":562},[501,3889,1893],{"class":562},[501,3891,1896],{"class":562},[501,3893,3894],{"class":562}," main@sha1:45260107\n",[16,3896,3897],{},"You can also get kustomizations CRD using the kubectl CLI:",[41,3899,3901],{"className":549,"code":3900,"language":551,"meta":14,"style":14},"kubectl get kustomizations -n flux-system \n\nNAME                AGE   READY   STATUS\napps                28h   True    Applied revision: main@sha1:45260107f70f9618872e50d4a196126a92ef715c\nflux-system         36h   True    Applied revision: main@sha1:45260107f70f9618872e50d4a196126a92ef715c\ninfra-configs       28h   True    Applied revision: main@sha1:45260107f70f9618872e50d4a196126a92ef715c\ninfra-controllers   28h   True    Applied revision: main@sha1:45260107f70f9618872e50d4a196126a92ef715c\n\n",[48,3902,3903,3920,3924,3936,3953,3968,3983],{"__ignoreMap":14},[501,3904,3905,3907,3909,3912,3914,3917],{"class":503,"line":504},[501,3906,1711],{"class":558},[501,3908,1714],{"class":562},[501,3910,3911],{"class":562}," kustomizations",[501,3913,1720],{"class":566},[501,3915,3916],{"class":562}," flux-system",[501,3918,3919],{"class":1346}," \n",[501,3921,3922],{"class":503,"line":510},[501,3923,1728],{"emptyLinePlaceholder":757},[501,3925,3926,3928,3931,3933],{"class":503,"line":516},[501,3927,1733],{"class":558},[501,3929,3930],{"class":562},"                AGE",[501,3932,1871],{"class":562},[501,3934,3935],{"class":562},"   STATUS\n",[501,3937,3938,3940,3943,3946,3948,3950],{"class":503,"line":1385},[501,3939,3818],{"class":558},[501,3941,3942],{"class":562},"                28h",[501,3944,3945],{"class":562},"   True",[501,3947,1893],{"class":562},[501,3949,1896],{"class":562},[501,3951,3952],{"class":562}," main@sha1:45260107f70f9618872e50d4a196126a92ef715c\n",[501,3954,3955,3957,3960,3962,3964,3966],{"class":503,"line":1394},[501,3956,1700],{"class":558},[501,3958,3959],{"class":562},"         36h",[501,3961,3945],{"class":562},[501,3963,1893],{"class":562},[501,3965,1896],{"class":562},[501,3967,3952],{"class":562},[501,3969,3970,3972,3975,3977,3979,3981],{"class":503,"line":1403},[501,3971,3860],{"class":558},[501,3973,3974],{"class":562},"       28h",[501,3976,3945],{"class":562},[501,3978,1893],{"class":562},[501,3980,1896],{"class":562},[501,3982,3952],{"class":562},[501,3984,3985,3987,3990,3992,3994,3996],{"class":503,"line":1415},[501,3986,3880],{"class":558},[501,3988,3989],{"class":562},"   28h",[501,3991,3945],{"class":562},[501,3993,1893],{"class":562},[501,3995,1896],{"class":562},[501,3997,3952],{"class":562},[29,3999,2059],{"id":2058},[16,4001,4002,4003,414],{},"In this tutorial, I haven't utilized a secret manager like Azure Key Vault. Instead, I've used a secret YAML file and ensured that it's not committed to GitHub by including it in the ",[1456,4004,4005],{},[674,4006,4007],{},".gitignore",[12,4009,4010,4012],{"type":2065},[16,4011,2068],{},[1618,4013,4014],{"v-slot:details":14},[16,4015,2073,4016,2079],{},[19,4017,2078],{"href":2076,"rel":4018},[23],[481,4020,2083],{"id":2082},[16,4022,4023],{},"Docker pull secret is being used in two ways:",[79,4025,4026,4029],{},[37,4027,4028],{},"Pull the blog-frontend image from Github registry",[37,4030,2094],{},[41,4032,4034],{"className":2097,"code":4033,"language":2099,"meta":14,"style":14},"apiVersion: v1\nkind: Secret\nmetadata:\n  name: cr-secret\n  namespace: flux-system\ntype: kubernetes.io/dockerconfigjson\ndata:\n  .dockerconfigjson: \u003CPUT_YOURS>\n---\napiVersion: v1\nkind: Secret\nmetadata:\n  name: cr-secret\n  namespace: blog\ntype: kubernetes.io/dockerconfigjson\ndata:\n  .dockerconfigjson: \u003CPUT_YOURS>\n",[48,4035,4036,4044,4052,4058,4066,4074,4082,4088,4096,4100,4108,4116,4122,4130,4139,4147,4153],{"__ignoreMap":14},[501,4037,4038,4040,4042],{"class":503,"line":504},[501,4039,2107],{"class":2106},[501,4041,2111],{"class":2110},[501,4043,2114],{"class":562},[501,4045,4046,4048,4050],{"class":503,"line":510},[501,4047,2119],{"class":2106},[501,4049,2111],{"class":2110},[501,4051,2124],{"class":562},[501,4053,4054,4056],{"class":503,"line":516},[501,4055,2129],{"class":2106},[501,4057,2132],{"class":2110},[501,4059,4060,4062,4064],{"class":503,"line":1385},[501,4061,2137],{"class":2106},[501,4063,2111],{"class":2110},[501,4065,2142],{"class":562},[501,4067,4068,4070,4072],{"class":503,"line":1394},[501,4069,2147],{"class":2106},[501,4071,2111],{"class":2110},[501,4073,1723],{"class":562},[501,4075,4076,4078,4080],{"class":503,"line":1403},[501,4077,2156],{"class":2106},[501,4079,2111],{"class":2110},[501,4081,2161],{"class":562},[501,4083,4084,4086],{"class":503,"line":1415},[501,4085,2166],{"class":2106},[501,4087,2132],{"class":2110},[501,4089,4090,4092,4094],{"class":503,"line":1423},[501,4091,2173],{"class":2106},[501,4093,2111],{"class":2110},[501,4095,2178],{"class":562},[501,4097,4098],{"class":503,"line":1433},[501,4099,2184],{"class":2183},[501,4101,4102,4104,4106],{"class":503,"line":1442},[501,4103,2107],{"class":2106},[501,4105,2111],{"class":2110},[501,4107,2114],{"class":562},[501,4109,4110,4112,4114],{"class":503,"line":2050},[501,4111,2119],{"class":2106},[501,4113,2111],{"class":2110},[501,4115,2124],{"class":562},[501,4117,4118,4120],{"class":503,"line":2203},[501,4119,2129],{"class":2106},[501,4121,2132],{"class":2110},[501,4123,4124,4126,4128],{"class":503,"line":2210},[501,4125,2137],{"class":2106},[501,4127,2111],{"class":2110},[501,4129,2142],{"class":562},[501,4131,4132,4134,4136],{"class":503,"line":2219},[501,4133,2147],{"class":2106},[501,4135,2111],{"class":2110},[501,4137,4138],{"class":562}," blog\n",[501,4140,4141,4143,4145],{"class":503,"line":2228},[501,4142,2156],{"class":2106},[501,4144,2111],{"class":2110},[501,4146,2161],{"class":562},[501,4148,4149,4151],{"class":503,"line":2237},[501,4150,2166],{"class":2106},[501,4152,2132],{"class":2110},[501,4154,4155,4157,4159],{"class":503,"line":2244},[501,4156,2173],{"class":2106},[501,4158,2111],{"class":2110},[501,4160,2178],{"class":562},[481,4162,4164],{"id":4163},"tls-cert-secret","TLS Cert Secret",[16,4166,4167],{},"You might want to use cert-mnagaer or manually use your own certificate or free one like Let's Encrypt.",[16,4169,4170,4171,4176],{},"I havent implemented cert-manager and simply created ",[1456,4172,4173],{},[674,4174,4175],{},"cert-secret"," that you`ll have to replace and apply the below yaml.",[41,4178,4180],{"className":2097,"code":4179,"language":2099,"meta":14,"style":14},"apiVersion: v1\nkind: Secret\nmetadata:\n  name: cert-secret\n  namespace: flux-system\ntype: kubernetes.io/tls\ndata:\n  tls.crt: \u003CPUT_YOURS>\n  tls.key: \u003CPUT_YOURS>\n---\napiVersion: v1\nkind: Secret\nmetadata:\n  name: cert-secret\n  namespace: blog\ntype: kubernetes.io/tls\ndata:\n  tls.crt: \u003CPUT_YOURS>\n  tls.key: \u003CPUT_YOURS>\n",[48,4181,4182,4190,4198,4204,4213,4221,4230,4236,4245,4254,4258,4266,4274,4280,4288,4296,4304,4310,4318],{"__ignoreMap":14},[501,4183,4184,4186,4188],{"class":503,"line":504},[501,4185,2107],{"class":2106},[501,4187,2111],{"class":2110},[501,4189,2114],{"class":562},[501,4191,4192,4194,4196],{"class":503,"line":510},[501,4193,2119],{"class":2106},[501,4195,2111],{"class":2110},[501,4197,2124],{"class":562},[501,4199,4200,4202],{"class":503,"line":516},[501,4201,2129],{"class":2106},[501,4203,2132],{"class":2110},[501,4205,4206,4208,4210],{"class":503,"line":1385},[501,4207,2137],{"class":2106},[501,4209,2111],{"class":2110},[501,4211,4212],{"class":562}," cert-secret\n",[501,4214,4215,4217,4219],{"class":503,"line":1394},[501,4216,2147],{"class":2106},[501,4218,2111],{"class":2110},[501,4220,1723],{"class":562},[501,4222,4223,4225,4227],{"class":503,"line":1403},[501,4224,2156],{"class":2106},[501,4226,2111],{"class":2110},[501,4228,4229],{"class":562}," kubernetes.io/tls\n",[501,4231,4232,4234],{"class":503,"line":1415},[501,4233,2166],{"class":2106},[501,4235,2132],{"class":2110},[501,4237,4238,4241,4243],{"class":503,"line":1423},[501,4239,4240],{"class":2106},"  tls.crt",[501,4242,2111],{"class":2110},[501,4244,2178],{"class":562},[501,4246,4247,4250,4252],{"class":503,"line":1433},[501,4248,4249],{"class":2106},"  tls.key",[501,4251,2111],{"class":2110},[501,4253,2178],{"class":562},[501,4255,4256],{"class":503,"line":1442},[501,4257,2184],{"class":2183},[501,4259,4260,4262,4264],{"class":503,"line":2050},[501,4261,2107],{"class":2106},[501,4263,2111],{"class":2110},[501,4265,2114],{"class":562},[501,4267,4268,4270,4272],{"class":503,"line":2203},[501,4269,2119],{"class":2106},[501,4271,2111],{"class":2110},[501,4273,2124],{"class":562},[501,4275,4276,4278],{"class":503,"line":2210},[501,4277,2129],{"class":2106},[501,4279,2132],{"class":2110},[501,4281,4282,4284,4286],{"class":503,"line":2219},[501,4283,2137],{"class":2106},[501,4285,2111],{"class":2110},[501,4287,4212],{"class":562},[501,4289,4290,4292,4294],{"class":503,"line":2228},[501,4291,2147],{"class":2106},[501,4293,2111],{"class":2110},[501,4295,4138],{"class":562},[501,4297,4298,4300,4302],{"class":503,"line":2237},[501,4299,2156],{"class":2106},[501,4301,2111],{"class":2110},[501,4303,4229],{"class":562},[501,4305,4306,4308],{"class":503,"line":2244},[501,4307,2166],{"class":2106},[501,4309,2132],{"class":2110},[501,4311,4312,4314,4316],{"class":503,"line":2735},[501,4313,4240],{"class":2106},[501,4315,2111],{"class":2110},[501,4317,2178],{"class":562},[501,4319,4320,4322,4324],{"class":503,"line":2746},[501,4321,4249],{"class":2106},[501,4323,2111],{"class":2110},[501,4325,2178],{"class":562},[29,4327,4329],{"id":4328},"validation","Validation",[16,4331,4332],{},"Once the reconciliation is completed and verified all kustomization are ready (described above) we can check the rest of the deployment.",[41,4334,4336],{"className":549,"code":4335,"language":551,"meta":14,"style":14},"kubectl get pod -n blog\n\nNAME                             READY   STATUS    RESTARTS   AGE\nblog-frontend-647c656d49-7q6x4   1/1     Running   0          79m\n",[48,4337,4338,4350,4354,4367],{"__ignoreMap":14},[501,4339,4340,4342,4344,4346,4348],{"class":503,"line":504},[501,4341,1711],{"class":558},[501,4343,1714],{"class":562},[501,4345,1717],{"class":562},[501,4347,1720],{"class":566},[501,4349,4138],{"class":562},[501,4351,4352],{"class":503,"line":510},[501,4353,1728],{"emptyLinePlaceholder":757},[501,4355,4356,4358,4361,4363,4365],{"class":503,"line":516},[501,4357,1733],{"class":558},[501,4359,4360],{"class":562},"                             READY",[501,4362,1739],{"class":562},[501,4364,1742],{"class":562},[501,4366,1745],{"class":562},[501,4368,4369,4372,4374,4376,4378],{"class":503,"line":1385},[501,4370,4371],{"class":558},"blog-frontend-647c656d49-7q6x4",[501,4373,1770],{"class":562},[501,4375,1756],{"class":562},[501,4377,1759],{"class":1576},[501,4379,4380],{"class":562},"          79m\n",[16,4382,4383,4384,4389,4393],{},"Flux also have ",[1456,4385,4386],{},[674,4387,4388],{},"weave-gitops UI",[1510,4390],{"alt":4391,"src":4392,"title":4391},"Weave Gitops","/images/blog/2023/09/10/weave-gitops-1.png",[1510,4394],{"alt":4391,"src":4395,"title":4391},"/images/blog/2023/09/10/weave-gitops-2.png",[29,4397,2254],{"id":2253},[16,4399,2257],{},[79,4401,4402],{},[37,4403,2262],{},[41,4405,4407],{"className":2097,"code":4406,"language":2099,"meta":14,"style":14},"apiVersion: image.toolkit.fluxcd.io/v1beta1\nkind: ImagePolicy\nmetadata:\n  name: blog-frontend\n  namespace: flux-system\nspec:\n  imageRepositoryRef:\n    name: blog-frontend\n  filterTags:\n    pattern: '^main-[a-f0-9]+-(?P\u003Cts>[0-9]+)'\n    extract: '$ts'\n  policy:\n    numerical:\n      order: asc\n",[48,4408,4409,4417,4425,4431,4440,4448,4454,4460,4468,4475,4489,4503,4509,4516],{"__ignoreMap":14},[501,4410,4411,4413,4415],{"class":503,"line":504},[501,4412,2107],{"class":2106},[501,4414,2111],{"class":2110},[501,4416,2276],{"class":562},[501,4418,4419,4421,4423],{"class":503,"line":510},[501,4420,2119],{"class":2106},[501,4422,2111],{"class":2110},[501,4424,2285],{"class":562},[501,4426,4427,4429],{"class":503,"line":516},[501,4428,2129],{"class":2106},[501,4430,2132],{"class":2110},[501,4432,4433,4435,4437],{"class":503,"line":1385},[501,4434,2137],{"class":2106},[501,4436,2111],{"class":2110},[501,4438,4439],{"class":562}," blog-frontend\n",[501,4441,4442,4444,4446],{"class":503,"line":1394},[501,4443,2147],{"class":2106},[501,4445,2111],{"class":2110},[501,4447,1723],{"class":562},[501,4449,4450,4452],{"class":503,"line":1403},[501,4451,2313],{"class":2106},[501,4453,2132],{"class":2110},[501,4455,4456,4458],{"class":503,"line":1415},[501,4457,2320],{"class":2106},[501,4459,2132],{"class":2110},[501,4461,4462,4464,4466],{"class":503,"line":1423},[501,4463,2327],{"class":2106},[501,4465,2111],{"class":2110},[501,4467,4439],{"class":562},[501,4469,4470,4473],{"class":503,"line":1433},[501,4471,4472],{"class":2106},"  filterTags",[501,4474,2132],{"class":2110},[501,4476,4477,4480,4482,4484,4487],{"class":503,"line":1442},[501,4478,4479],{"class":2106},"    pattern",[501,4481,2111],{"class":2110},[501,4483,2495],{"class":1983},[501,4485,4486],{"class":562},"^main-[a-f0-9]+-(?P\u003Cts>[0-9]+)",[501,4488,2759],{"class":1983},[501,4490,4491,4494,4496,4498,4501],{"class":503,"line":2050},[501,4492,4493],{"class":2106},"    extract",[501,4495,2111],{"class":2110},[501,4497,2495],{"class":1983},[501,4499,4500],{"class":562},"$ts",[501,4502,2759],{"class":1983},[501,4504,4505,4507],{"class":503,"line":2203},[501,4506,2336],{"class":2106},[501,4508,2132],{"class":2110},[501,4510,4511,4514],{"class":503,"line":2210},[501,4512,4513],{"class":2106},"    numerical",[501,4515,2132],{"class":2110},[501,4517,4518,4521,4523],{"class":503,"line":2219},[501,4519,4520],{"class":2106},"      order",[501,4522,2111],{"class":2110},[501,4524,4525],{"class":562}," asc\n",[41,4527,4529],{"className":2097,"code":4528,"language":2099,"meta":14,"style":14},"apiVersion: image.toolkit.fluxcd.io/v1beta1\nkind: ImageRepository\nmetadata:\n  name: blog-frontend\n  namespace: flux-system\nspec:\n  image: blog-frontend\n  interval: 1m0s\n  secretRef:\n    name: DOCKER_SECRET\n",[48,4530,4531,4539,4547,4553,4561,4569,4575,4583,4591,4598],{"__ignoreMap":14},[501,4532,4533,4535,4537],{"class":503,"line":504},[501,4534,2107],{"class":2106},[501,4536,2111],{"class":2110},[501,4538,2276],{"class":562},[501,4540,4541,4543,4545],{"class":503,"line":510},[501,4542,2119],{"class":2106},[501,4544,2111],{"class":2110},[501,4546,2377],{"class":562},[501,4548,4549,4551],{"class":503,"line":516},[501,4550,2129],{"class":2106},[501,4552,2132],{"class":2110},[501,4554,4555,4557,4559],{"class":503,"line":1385},[501,4556,2137],{"class":2106},[501,4558,2111],{"class":2110},[501,4560,4439],{"class":562},[501,4562,4563,4565,4567],{"class":503,"line":1394},[501,4564,2147],{"class":2106},[501,4566,2111],{"class":2110},[501,4568,1723],{"class":562},[501,4570,4571,4573],{"class":503,"line":1403},[501,4572,2313],{"class":2106},[501,4574,2132],{"class":2110},[501,4576,4577,4579,4581],{"class":503,"line":1415},[501,4578,2410],{"class":2106},[501,4580,2111],{"class":2110},[501,4582,4439],{"class":562},[501,4584,4585,4587,4589],{"class":503,"line":1423},[501,4586,2420],{"class":2106},[501,4588,2111],{"class":2110},[501,4590,2425],{"class":562},[501,4592,4593,4596],{"class":503,"line":1433},[501,4594,4595],{"class":2106},"  secretRef",[501,4597,2132],{"class":2110},[501,4599,4600,4602,4604],{"class":503,"line":1442},[501,4601,2327],{"class":2106},[501,4603,2111],{"class":2110},[501,4605,4606],{"class":562}," DOCKER_SECRET\n",[41,4608,4610],{"className":549,"code":4609,"language":551,"meta":14,"style":14},"flux get image policy    \nNAME            LATEST IMAGE                                            READY   MESSAGE                                                                                                               \nblog-frontend   ghcr.io/devozs/blog-frontend:main-0292a018-1694284510   True    Latest image tag for 'ghcr.io/devozs/blog-frontend' updated from main-18c2d24e-1694278211 to main-0292a018-1694284510\n\nflux get image repository   \nNAME            LAST SCAN                   SUSPENDED   READY   MESSAGE                        \nblog-frontend   2023-09-09T22:50:26+03:00   False       True    successful scan: found 15 tags  \n\n",[48,4611,4612,4624,4641,4678,4682,4694,4711],{"__ignoreMap":14},[501,4613,4614,4616,4618,4620,4622],{"class":503,"line":504},[501,4615,1849],{"class":558},[501,4617,1714],{"class":562},[501,4619,2439],{"class":562},[501,4621,2442],{"class":562},[501,4623,3836],{"class":1346},[501,4625,4626,4628,4631,4633,4636,4638],{"class":503,"line":510},[501,4627,1733],{"class":558},[501,4629,4630],{"class":562},"            LATEST",[501,4632,2459],{"class":562},[501,4634,4635],{"class":562},"                                            READY",[501,4637,1874],{"class":562},[501,4639,4640],{"class":1346},"                                                                                                               \n",[501,4642,4643,4646,4649,4651,4653,4655,4657,4659,4661,4664,4666,4668,4670,4673,4675],{"class":503,"line":516},[501,4644,4645],{"class":558},"blog-frontend",[501,4647,4648],{"class":562},"   ghcr.io/devozs/blog-frontend:main-0292a018-1694284510",[501,4650,3945],{"class":562},[501,4652,2484],{"class":562},[501,4654,2439],{"class":562},[501,4656,2489],{"class":562},[501,4658,2492],{"class":562},[501,4660,2495],{"class":1983},[501,4662,4663],{"class":562},"ghcr.io/devozs/blog-frontend",[501,4665,2501],{"class":1983},[501,4667,2504],{"class":562},[501,4669,2507],{"class":562},[501,4671,4672],{"class":562}," main-18c2d24e-1694278211",[501,4674,2513],{"class":562},[501,4676,4677],{"class":562}," main-0292a018-1694284510\n",[501,4679,4680],{"class":503,"line":1385},[501,4681,1728],{"emptyLinePlaceholder":757},[501,4683,4684,4686,4688,4690,4692],{"class":503,"line":1394},[501,4685,1849],{"class":558},[501,4687,1714],{"class":562},[501,4689,2439],{"class":562},[501,4691,2534],{"class":562},[501,4693,2519],{"class":1346},[501,4695,4696,4698,4701,4703,4705,4707,4709],{"class":503,"line":1403},[501,4697,1733],{"class":558},[501,4699,4700],{"class":562},"            LAST",[501,4702,2548],{"class":562},[501,4704,2551],{"class":562},[501,4706,1871],{"class":562},[501,4708,1874],{"class":562},[501,4710,2558],{"class":1346},[501,4712,4713,4715,4718,4720,4722,4724,4726,4728,4731],{"class":503,"line":1415},[501,4714,4645],{"class":558},[501,4716,4717],{"class":562},"   2023-09-09T22:50:26+03:00",[501,4719,2570],{"class":562},[501,4721,1890],{"class":562},[501,4723,2575],{"class":562},[501,4725,2578],{"class":562},[501,4727,2581],{"class":562},[501,4729,4730],{"class":1576}," 15",[501,4732,2587],{"class":562},[79,4734,4735],{},[37,4736,2592],{},[41,4738,4739],{"className":2097,"code":2595,"language":2099,"meta":14,"style":14},[48,4740,4741,4749,4757,4763,4771,4779,4785,4793,4799,4807,4815,4821,4827,4833,4841,4847,4853,4861,4869,4881,4887,4895,4901,4909],{"__ignoreMap":14},[501,4742,4743,4745,4747],{"class":503,"line":504},[501,4744,2107],{"class":2106},[501,4746,2111],{"class":2110},[501,4748,2276],{"class":562},[501,4750,4751,4753,4755],{"class":503,"line":510},[501,4752,2119],{"class":2106},[501,4754,2111],{"class":2110},[501,4756,2614],{"class":562},[501,4758,4759,4761],{"class":503,"line":516},[501,4760,2129],{"class":2106},[501,4762,2132],{"class":2110},[501,4764,4765,4767,4769],{"class":503,"line":1385},[501,4766,2137],{"class":2106},[501,4768,2111],{"class":2110},[501,4770,2629],{"class":562},[501,4772,4773,4775,4777],{"class":503,"line":1394},[501,4774,2147],{"class":2106},[501,4776,2111],{"class":2110},[501,4778,1723],{"class":562},[501,4780,4781,4783],{"class":503,"line":1403},[501,4782,2313],{"class":2106},[501,4784,2132],{"class":2110},[501,4786,4787,4789,4791],{"class":503,"line":1415},[501,4788,2420],{"class":2106},[501,4790,2111],{"class":2110},[501,4792,2652],{"class":562},[501,4794,4795,4797],{"class":503,"line":1423},[501,4796,2657],{"class":2106},[501,4798,2132],{"class":2110},[501,4800,4801,4803,4805],{"class":503,"line":1433},[501,4802,2664],{"class":2106},[501,4804,2111],{"class":2110},[501,4806,2669],{"class":562},[501,4808,4809,4811,4813],{"class":503,"line":1442},[501,4810,2327],{"class":2106},[501,4812,2111],{"class":2110},[501,4814,1723],{"class":562},[501,4816,4817,4819],{"class":503,"line":2050},[501,4818,2682],{"class":2106},[501,4820,2132],{"class":2110},[501,4822,4823,4825],{"class":503,"line":2203},[501,4824,2689],{"class":2106},[501,4826,2132],{"class":2110},[501,4828,4829,4831],{"class":503,"line":2210},[501,4830,2696],{"class":2106},[501,4832,2132],{"class":2110},[501,4834,4835,4837,4839],{"class":503,"line":2219},[501,4836,2703],{"class":2106},[501,4838,2111],{"class":2110},[501,4840,2708],{"class":562},[501,4842,4843,4845],{"class":503,"line":2228},[501,4844,2713],{"class":2106},[501,4846,2132],{"class":2110},[501,4848,4849,4851],{"class":503,"line":2237},[501,4850,2720],{"class":2106},[501,4852,2132],{"class":2110},[501,4854,4855,4857,4859],{"class":503,"line":2244},[501,4856,2727],{"class":2106},[501,4858,2111],{"class":2110},[501,4860,2732],{"class":562},[501,4862,4863,4865,4867],{"class":503,"line":2735},[501,4864,2738],{"class":2106},[501,4866,2111],{"class":2110},[501,4868,2743],{"class":562},[501,4870,4871,4873,4875,4877,4879],{"class":503,"line":2746},[501,4872,2749],{"class":2106},[501,4874,2111],{"class":2110},[501,4876,2495],{"class":1983},[501,4878,2756],{"class":562},[501,4880,2759],{"class":1983},[501,4882,4883,4885],{"class":503,"line":2762},[501,4884,2765],{"class":2106},[501,4886,2132],{"class":2110},[501,4888,4889,4891,4893],{"class":503,"line":2770},[501,4890,2773],{"class":2106},[501,4892,2111],{"class":2110},[501,4894,2708],{"class":562},[501,4896,4897,4899],{"class":503,"line":2780},[501,4898,2783],{"class":2106},[501,4900,2132],{"class":2110},[501,4902,4903,4905,4907],{"class":503,"line":2788},[501,4904,2791],{"class":2106},[501,4906,2111],{"class":2110},[501,4908,2796],{"class":562},[501,4910,4911,4913,4915],{"class":503,"line":2799},[501,4912,2802],{"class":2106},[501,4914,2111],{"class":2110},[501,4916,2807],{"class":562},[41,4918,4920],{"className":549,"code":4919,"language":551,"meta":14,"style":14},"flux get image update    \nNAME                    LAST RUN                    SUSPENDED   READY   MESSAGE                                                      \nimage-update-automation 2023-09-09T22:52:13+03:00   False       True    no updates made; last commit d984f3e at 2023-09-09T18:37:57Z    \n",[48,4921,4922,4935,4955],{"__ignoreMap":14},[501,4923,4924,4926,4928,4930,4933],{"class":503,"line":504},[501,4925,1849],{"class":558},[501,4927,1714],{"class":562},[501,4929,2439],{"class":562},[501,4931,4932],{"class":562}," update",[501,4934,3836],{"class":1346},[501,4936,4937,4939,4942,4945,4948,4950,4952],{"class":503,"line":510},[501,4938,1733],{"class":558},[501,4940,4941],{"class":562},"                    LAST",[501,4943,4944],{"class":562}," RUN",[501,4946,4947],{"class":562},"                    SUSPENDED",[501,4949,1871],{"class":562},[501,4951,1874],{"class":562},[501,4953,4954],{"class":1346},"                                                      \n",[501,4956,4957,4960,4963,4965,4967,4970,4973,4976,4980,4983,4986,4989,4992],{"class":503,"line":516},[501,4958,4959],{"class":558},"image-update-automation",[501,4961,4962],{"class":562}," 2023-09-09T22:52:13+03:00",[501,4964,2570],{"class":562},[501,4966,1890],{"class":562},[501,4968,4969],{"class":562},"    no",[501,4971,4972],{"class":562}," updates",[501,4974,4975],{"class":562}," made",[501,4977,4979],{"class":4978},"sDxrV",";",[501,4981,4982],{"class":558}," last",[501,4984,4985],{"class":562}," commit",[501,4987,4988],{"class":562}," d984f3e",[501,4990,4991],{"class":562}," at",[501,4993,4994],{"class":562}," 2023-09-09T18:37:57Z\n",[16,4996,4997,4998,5003,5004],{},"It will cause an update on ",[1456,4999,5000],{},[674,5001,5002],{},"./gitops/clusters/dev/kustomization.yaml"," by the placeholder ",[1456,5005,5006],{},[674,5007,5008],{},"{\"$imagepolicy\": \"flux-system:blog-frontend:tag\"}",[41,5010,5012],{"className":2097,"code":5011,"language":2099,"meta":14,"style":14},"apiVersion: kustomize.config.k8s.io/v1beta1\nkind: Kustomization\nresources:\n  - ../base\npatches:\n  - path: patches/blog-frontend-image-policy.yaml\n    target:\n      group: image.toolkit.fluxcd.io\n      version: v1beta1\n      kind: ImagePolicy\n      namespace: flux-system\n      name: blog-frontend\n  - path: patches/blog-frontend-image-repository.yaml\n    target:\n      group: image.toolkit.fluxcd.io\n      version: v1beta1\n      kind: ImageRepository\n      namespace: flux-system\n      name: blog-frontend\n  - path: patches/image-update-automation.yaml\n    target:\n      group: image.toolkit.fluxcd.io\n      version: v1beta1\n      kind: ImageUpdateAutomation\n      namespace: flux-system\nimages:\n  - name: blog-frontend\n    newName: ghcr.io/devozs/blog-frontend\n    newTag: main-18c2d24e-1694278211 # {\"$imagepolicy\": \"flux-system:blog-frontend:tag\"}\n\n",[48,5013,5014,5023,5032,5039,5047,5054,5066,5073,5083,5093,5102,5111,5120,5131,5137,5145,5153,5161,5169,5177,5188,5194,5202,5210,5218,5226,5233,5244,5254],{"__ignoreMap":14},[501,5015,5016,5018,5020],{"class":503,"line":504},[501,5017,2107],{"class":2106},[501,5019,2111],{"class":2110},[501,5021,5022],{"class":562}," kustomize.config.k8s.io/v1beta1\n",[501,5024,5025,5027,5029],{"class":503,"line":510},[501,5026,2119],{"class":2106},[501,5028,2111],{"class":2110},[501,5030,5031],{"class":562}," Kustomization\n",[501,5033,5034,5037],{"class":503,"line":516},[501,5035,5036],{"class":2106},"resources",[501,5038,2132],{"class":2110},[501,5040,5041,5044],{"class":503,"line":1385},[501,5042,5043],{"class":2110},"  -",[501,5045,5046],{"class":562}," ../base\n",[501,5048,5049,5052],{"class":503,"line":1394},[501,5050,5051],{"class":2106},"patches",[501,5053,2132],{"class":2110},[501,5055,5056,5058,5061,5063],{"class":503,"line":1403},[501,5057,5043],{"class":2110},[501,5059,5060],{"class":2106}," path",[501,5062,2111],{"class":2110},[501,5064,5065],{"class":562}," patches/blog-frontend-image-policy.yaml\n",[501,5067,5068,5071],{"class":503,"line":1415},[501,5069,5070],{"class":2106},"    target",[501,5072,2132],{"class":2110},[501,5074,5075,5078,5080],{"class":503,"line":1423},[501,5076,5077],{"class":2106},"      group",[501,5079,2111],{"class":2110},[501,5081,5082],{"class":562}," image.toolkit.fluxcd.io\n",[501,5084,5085,5088,5090],{"class":503,"line":1433},[501,5086,5087],{"class":2106},"      version",[501,5089,2111],{"class":2110},[501,5091,5092],{"class":562}," v1beta1\n",[501,5094,5095,5098,5100],{"class":503,"line":1442},[501,5096,5097],{"class":2106},"      kind",[501,5099,2111],{"class":2110},[501,5101,2285],{"class":562},[501,5103,5104,5107,5109],{"class":503,"line":2050},[501,5105,5106],{"class":2106},"      namespace",[501,5108,2111],{"class":2110},[501,5110,1723],{"class":562},[501,5112,5113,5116,5118],{"class":503,"line":2203},[501,5114,5115],{"class":2106},"      name",[501,5117,2111],{"class":2110},[501,5119,4439],{"class":562},[501,5121,5122,5124,5126,5128],{"class":503,"line":2210},[501,5123,5043],{"class":2110},[501,5125,5060],{"class":2106},[501,5127,2111],{"class":2110},[501,5129,5130],{"class":562}," patches/blog-frontend-image-repository.yaml\n",[501,5132,5133,5135],{"class":503,"line":2219},[501,5134,5070],{"class":2106},[501,5136,2132],{"class":2110},[501,5138,5139,5141,5143],{"class":503,"line":2228},[501,5140,5077],{"class":2106},[501,5142,2111],{"class":2110},[501,5144,5082],{"class":562},[501,5146,5147,5149,5151],{"class":503,"line":2237},[501,5148,5087],{"class":2106},[501,5150,2111],{"class":2110},[501,5152,5092],{"class":562},[501,5154,5155,5157,5159],{"class":503,"line":2244},[501,5156,5097],{"class":2106},[501,5158,2111],{"class":2110},[501,5160,2377],{"class":562},[501,5162,5163,5165,5167],{"class":503,"line":2735},[501,5164,5106],{"class":2106},[501,5166,2111],{"class":2110},[501,5168,1723],{"class":562},[501,5170,5171,5173,5175],{"class":503,"line":2746},[501,5172,5115],{"class":2106},[501,5174,2111],{"class":2110},[501,5176,4439],{"class":562},[501,5178,5179,5181,5183,5185],{"class":503,"line":2762},[501,5180,5043],{"class":2110},[501,5182,5060],{"class":2106},[501,5184,2111],{"class":2110},[501,5186,5187],{"class":562}," patches/image-update-automation.yaml\n",[501,5189,5190,5192],{"class":503,"line":2770},[501,5191,5070],{"class":2106},[501,5193,2132],{"class":2110},[501,5195,5196,5198,5200],{"class":503,"line":2780},[501,5197,5077],{"class":2106},[501,5199,2111],{"class":2110},[501,5201,5082],{"class":562},[501,5203,5204,5206,5208],{"class":503,"line":2788},[501,5205,5087],{"class":2106},[501,5207,2111],{"class":2110},[501,5209,5092],{"class":562},[501,5211,5212,5214,5216],{"class":503,"line":2799},[501,5213,5097],{"class":2106},[501,5215,2111],{"class":2110},[501,5217,2614],{"class":562},[501,5219,5220,5222,5224],{"class":503,"line":3513},[501,5221,5106],{"class":2106},[501,5223,2111],{"class":2110},[501,5225,1723],{"class":562},[501,5227,5228,5231],{"class":503,"line":3525},[501,5229,5230],{"class":2106},"images",[501,5232,2132],{"class":2110},[501,5234,5235,5237,5240,5242],{"class":503,"line":3553},[501,5236,5043],{"class":2110},[501,5238,5239],{"class":2106}," name",[501,5241,2111],{"class":2110},[501,5243,4439],{"class":562},[501,5245,5246,5249,5251],{"class":503,"line":3565},[501,5247,5248],{"class":2106},"    newName",[501,5250,2111],{"class":2110},[501,5252,5253],{"class":562}," ghcr.io/devozs/blog-frontend\n",[501,5255,5256,5259,5261,5263],{"class":503,"line":3581},[501,5257,5258],{"class":2106},"    newTag",[501,5260,2111],{"class":2110},[501,5262,4672],{"class":562},[501,5264,5266],{"class":5265},"sr5Cr"," # {\"$imagepolicy\": \"flux-system:blog-frontend:tag\"}\n",[29,5268,5270],{"id":5269},"access-the-application-ui","Access the application UI",[16,5272,5273,5274,5279,5280,5284,5285,5290],{},"You can either set a ",[1456,5275,5276],{},[674,5277,5278],{},"port-forward"," to the ",[1456,5281,5282],{},[674,5283,4645],{}," service or add a DNS record with envoy ",[1456,5286,5287],{},[674,5288,5289],{},"Load Balancer EXTERNAL-IP",".",[481,5292,5278],{"id":5278},[41,5294,5296],{"className":549,"code":5295,"language":551,"meta":14,"style":14},"kubectl port-forward -n blog service/blog-frontend 3000:3000\n\nForwarding from 127.0.0.1:3000 -> 3000\nForwarding from [::1]:3000 -> 3000\n\n",[48,5297,5298,5316,5320,5338],{"__ignoreMap":14},[501,5299,5300,5302,5305,5307,5310,5313],{"class":503,"line":504},[501,5301,1711],{"class":558},[501,5303,5304],{"class":562}," port-forward",[501,5306,1720],{"class":566},[501,5308,5309],{"class":562}," blog",[501,5311,5312],{"class":562}," service/blog-frontend",[501,5314,5315],{"class":562}," 3000:3000\n",[501,5317,5318],{"class":503,"line":510},[501,5319,1728],{"emptyLinePlaceholder":757},[501,5321,5322,5325,5327,5330,5333,5335],{"class":503,"line":516},[501,5323,5324],{"class":558},"Forwarding",[501,5326,2507],{"class":562},[501,5328,5329],{"class":562}," 127.0.0.1:3000",[501,5331,5332],{"class":1346}," -",[501,5334,3130],{"class":1640},[501,5336,5337],{"class":1576}," 3000\n",[501,5339,5340,5342,5344,5347,5349],{"class":503,"line":1385},[501,5341,5324],{"class":558},[501,5343,2507],{"class":562},[501,5345,5346],{"class":1346}," [::1]:3000 -",[501,5348,3130],{"class":1640},[501,5350,5337],{"class":1346},[481,5352,5353],{"id":5353},"contour",[16,5355,5356,5357,5362],{},"As part of the deployment we are also using ",[19,5358,5361],{"href":5359,"rel":5360},"https://projectcontour.io/",[23],"Contour"," as ingress controller.",[16,5364,5365,5366,5370],{},"Once the services are deployed you can get envoy ",[1456,5367,5368],{},[674,5369,5289],{},". for example: 20.xx.xx.224 and add a DNS A record in your domain provider.",[41,5372,5374],{"className":549,"code":5373,"language":551,"meta":14,"style":14},"kubectl get services -n projectcontour \n\nNAME      TYPE           CLUSTER-IP     EXTERNAL-IP    PORT(S)                      AGE\ncontour   ClusterIP      10.0.89.98     \u003Cnone>         8001/TCP                     24h\nenvoy     LoadBalancer   10.0.253.112   20.xx.xx.224   80:30395/TCP,443:31965/TCP   24h\n\n",[48,5375,5376,5392,5396,5423,5450],{"__ignoreMap":14},[501,5377,5378,5380,5382,5385,5387,5390],{"class":503,"line":504},[501,5379,1711],{"class":558},[501,5381,1714],{"class":562},[501,5383,5384],{"class":562}," services",[501,5386,1720],{"class":566},[501,5388,5389],{"class":562}," projectcontour",[501,5391,3919],{"class":1346},[501,5393,5394],{"class":503,"line":510},[501,5395,1728],{"emptyLinePlaceholder":757},[501,5397,5398,5400,5403,5406,5409,5412,5415,5418,5420],{"class":503,"line":516},[501,5399,1733],{"class":558},[501,5401,5402],{"class":562},"      TYPE",[501,5404,5405],{"class":562},"           CLUSTER-IP",[501,5407,5408],{"class":562},"     EXTERNAL-IP",[501,5410,5411],{"class":562},"    PORT",[501,5413,5414],{"class":2110},"(",[501,5416,5417],{"class":558},"S",[501,5419,2079],{"class":2110},[501,5421,5422],{"class":562},"                      AGE\n",[501,5424,5425,5427,5430,5433,5436,5439,5442,5444,5447],{"class":503,"line":1385},[501,5426,5353],{"class":558},[501,5428,5429],{"class":562},"   ClusterIP",[501,5431,5432],{"class":1576},"      10.0.89.98",[501,5434,5435],{"class":1640},"     \u003C",[501,5437,5438],{"class":562},"non",[501,5440,5441],{"class":1346},"e",[501,5443,3130],{"class":1640},[501,5445,5446],{"class":562},"         8001/TCP",[501,5448,5449],{"class":562},"                     24h\n",[501,5451,5452,5455,5458,5461,5464,5467],{"class":503,"line":1394},[501,5453,5454],{"class":558},"envoy",[501,5456,5457],{"class":562},"     LoadBalancer",[501,5459,5460],{"class":1576},"   10.0.253.112",[501,5462,5463],{"class":562},"   20.xx.xx.224",[501,5465,5466],{"class":562},"   80:30395/TCP,443:31965/TCP",[501,5468,5469],{"class":562},"   24h\n",[725,5471,5472],{},"html pre.shiki code .sNHwn, html code.shiki .sNHwn{--shiki-default:#88C0D0;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .siq7d, html code.shiki .siq7d{--shiki-default:#A3BE8C;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .sqTyp, html code.shiki .sqTyp{--shiki-default:#A3BE8C;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .sX_qU, html code.shiki .sX_qU{--shiki-default:#B48EAD;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .s4BcI, html code.shiki .s4BcI{--shiki-default:#81A1C1;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .sn_7u, html code.shiki .sn_7u{--shiki-default:#D8DEE9;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sQE_P, html code.shiki .sQE_P{--shiki-default:#ECEFF4;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sw3Zv, html code.shiki .sw3Zv{--shiki-default:#D8DEE9FF;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .skFRX, html code.shiki .skFRX{--shiki-default:#8FBCBB;--shiki-dark:#85E89D;--shiki-sepia:#F92672}html pre.shiki code .sUaCP, html code.shiki .sUaCP{--shiki-default:#ECEFF4;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .siby6, html code.shiki .siby6{--shiki-default:#D8DEE9FF;--shiki-dark:#B392F0;--shiki-sepia:#F8F8F2}html pre.shiki code .sDxrV, html code.shiki .sDxrV{--shiki-default:#81A1C1;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sr5Cr, html code.shiki .sr5Cr{--shiki-default:#616E88;--shiki-dark:#6A737D;--shiki-sepia:#88846F}",{"title":14,"searchDepth":510,"depth":510,"links":5474},[5475,5476,5477,5481,5485,5486,5487],{"id":1246,"depth":510,"text":1247},{"id":1278,"depth":510,"text":1279},{"id":2964,"depth":510,"text":2965,"children":5478},[5479,5480],{"id":1691,"depth":516,"text":1692},{"id":1835,"depth":516,"text":1836},{"id":2058,"depth":510,"text":2059,"children":5482},[5483,5484],{"id":2082,"depth":516,"text":2083},{"id":4163,"depth":516,"text":4164},{"id":4328,"depth":510,"text":4329},{"id":2253,"depth":510,"text":2254},{"id":5269,"depth":510,"text":5270,"children":5488},[5489,5490],{"id":5278,"depth":516,"text":5278},{"id":5353,"depth":516,"text":5353},"2023-09-10T08:00:00.000Z","GitOps, CD, Deployment, FluxCD",{"published":757},"/blog/2023/09/10/continuence-deployment-flux",{"title":2842,"description":2847},"continuence-deployment","blog/2023/09/10/continuence-deployment-flux",[2835,2836,1536,1225],"uLuop-k74KATaQGXfpqX0N1YyFtdqJy4eWN791_QdrA",{"id":5501,"title":5502,"author":7,"body":5503,"cover":7398,"date":7399,"description":5507,"draft":752,"excerpt":753,"extension":754,"github":5514,"keywords":7400,"meta":7401,"navigation":757,"path":7402,"seo":7403,"shortDesc":753,"slug":7404,"stem":7405,"tags":7406,"video":753,"__hash__":7408},"blog/blog/2023/09/09/continuence-integration.md","Continuences Integration",{"type":9,"value":5504,"toc":7387},[5505,5508,5516,5518,5527,5541,5545,5548,5551,5627,5631,5634,5648,6300,6304,6317,6328,6334,6338,6341,6346,6443,6446,6452,6455,6866,6870,6873,6883,6898,6989,6993,6996,7010,7343,7345,7353,7356,7384],[16,5506,5507],{},"In the forthcoming blog post, we'll explore the deployment of a Nuxt 3 (Vue 3) application running on a Node.js environment. Our focus will be on setting up a comprehensive CI pipeline, encompassing tasks such as testing, building, Docker containerization, and pushing an image to a container registry.",[12,5509,5510],{"type":14},[16,5511,5512],{},[19,5513,24],{"href":5514,"rel":5515},"https://github.com/devozs/blog-frontend",[23],[29,5517,1247],{"id":1246},[16,5519,5520,5521,5526],{},"To achieve this, I've used ",[19,5522,5525],{"href":5523,"rel":5524},"https://github.com/features/actions",[23],"GitHub Actions"," as the CI workflow. Nevertheless, it's important to highlight that you have the flexibility to opt for different tools according to your requirements, whether it's Jenkins, Gitlab CI, or any other CI solution that aligns with your preferences.",[12,5528,5529,5532],{"type":1267},[16,5530,5531],{},"Container Registry Prepeartion!",[1618,5533,5534],{"v-slot:details":14},[16,5535,5536,5537],{},"I've chosen to use GitHub Packages as the container registry to store the application image. However, it's essential to note that you have the flexibility to opt for alternative container registries such as Docker Hub, Azure Container Registry, and others if you prefer.",[19,5538,1287],{"href":5539,"rel":5540},"https://github.com/features/packages",[23],[29,5542,5544],{"id":5543},"dockerfile","Dockerfile",[16,5546,5547],{},"As previously mentioned, we're working with a Node.js application, which is why we're using the node:17 parent image.",[16,5549,5550],{},"In the following lines, we'll be copying the necessary files into the container, exposing a container port, and configuring the entry point to run the server.",[41,5552,5555],{"className":5553,"code":5554,"language":559,"meta":14,"style":14},"language-docker shiki shiki-themes nord github-dark monokai","FROM node:17-alpine\n\nRUN mkdir -p /usr/src/nuxt-app\nWORKDIR /usr/src/nuxt-app\nCOPY . .\n\nRUN npm ci && npm cache clean --force\nRUN npm run build\n\nENV NUXT_HOST=0.0.0.0\nENV NUXT_PORT=3000\n\nEXPOSE 3000\n\nENTRYPOINT [\"node\", \".output/server/index.mjs\"]\n",[48,5556,5557,5562,5566,5571,5576,5581,5585,5590,5595,5599,5604,5609,5613,5618,5622],{"__ignoreMap":14},[501,5558,5559],{"class":503,"line":504},[501,5560,5561],{},"FROM node:17-alpine\n",[501,5563,5564],{"class":503,"line":510},[501,5565,1728],{"emptyLinePlaceholder":757},[501,5567,5568],{"class":503,"line":516},[501,5569,5570],{},"RUN mkdir -p /usr/src/nuxt-app\n",[501,5572,5573],{"class":503,"line":1385},[501,5574,5575],{},"WORKDIR /usr/src/nuxt-app\n",[501,5577,5578],{"class":503,"line":1394},[501,5579,5580],{},"COPY . .\n",[501,5582,5583],{"class":503,"line":1403},[501,5584,1728],{"emptyLinePlaceholder":757},[501,5586,5587],{"class":503,"line":1415},[501,5588,5589],{},"RUN npm ci && npm cache clean --force\n",[501,5591,5592],{"class":503,"line":1423},[501,5593,5594],{},"RUN npm run build\n",[501,5596,5597],{"class":503,"line":1433},[501,5598,1728],{"emptyLinePlaceholder":757},[501,5600,5601],{"class":503,"line":1442},[501,5602,5603],{},"ENV NUXT_HOST=0.0.0.0\n",[501,5605,5606],{"class":503,"line":2050},[501,5607,5608],{},"ENV NUXT_PORT=3000\n",[501,5610,5611],{"class":503,"line":2203},[501,5612,1728],{"emptyLinePlaceholder":757},[501,5614,5615],{"class":503,"line":2210},[501,5616,5617],{},"EXPOSE 3000\n",[501,5619,5620],{"class":503,"line":2219},[501,5621,1728],{"emptyLinePlaceholder":757},[501,5623,5624],{"class":503,"line":2228},[501,5625,5626],{},"ENTRYPOINT [\"node\", \".output/server/index.mjs\"]\n",[29,5628,5630],{"id":5629},"ci-workflow","CI Workflow",[16,5632,5633],{},"We are using GitHub Action for the CI pipeline implementation.",[16,5635,5636,5637,5642,5643],{},"GitHub search workflow yamls under the repository location: ",[1456,5638,5639],{},[674,5640,5641],{},".github/workflows",".\nWe've created a workflow named ",[1456,5644,5645],{},[674,5646,5647],{},"buildAndPush.yaml",[12,5649,5650,5653],{"type":48},[16,5651,5652],{},"Full buildAndPush.yaml",[1618,5654,5655],{"v-slot:details":14},[41,5656,5658],{"className":2097,"code":5657,"language":2099,"meta":14,"style":14},"name: Blog Frontend - Test, Build and Push\n\non:\n  workflow_dispatch:\n  push:\n    branches:\n      - 'main'\njobs:\n  test:\n    runs-on: ubuntu-latest\n    \n    permissions:\n      contents: read\n      pull-requests: write\n\n    steps:\n    - uses: actions/checkout@v3\n\n    - name: 'Install Node'\n      uses: actions/setup-node@v3\n      with:\n        node-version: '17'\n\n    - name: 'Install Deps'\n      run: |\n        npm install\n        npm run build\n\n    - name: 'Test'\n      run: npx vitest --coverage\n\n    - name: 'Report Coverage'\n      if: always() # Also generate the report if tests are failing\n      uses:  davelosert/vitest-coverage-report-action@v2\n\n  build-push:\n    needs: test\n    env:\n      REGISTRY: ghcr.io/devozs\n      IMAGE: blog-frontend\n    runs-on: ubuntu-latest\n    steps:\n      - name: \"Checkout GitHub Action\"\n        uses: actions/checkout@v3\n\n      - name: Generate build ID\n        id: prep\n        run: |\n            branch=${GITHUB_REF##*/}\n            sha=${GITHUB_SHA::8}\n            ts=$(date +%s)\n            echo \"BUILD_ID=${branch}-${sha}-${ts}\" >> $GITHUB_OUTPUT\n      - name: Set up QEMU\n        uses: docker/setup-qemu-action@v2\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v2\n\n      - name: \"Build\"\n        run: |\n          docker build -f Dockerfile . -t ${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n\n      - name: Log in to the Container registry\n        uses: docker/login-action@v2\n        with:\n          registry: ghcr.io\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: \"Docker Push\"\n        run: |\n          docker tag ${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }} ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n          docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n",[48,5659,5660,5670,5674,5682,5689,5696,5703,5714,5721,5728,5738,5742,5749,5759,5769,5773,5780,5793,5797,5812,5822,5829,5843,5847,5862,5872,5877,5882,5886,5900,5909,5913,5928,5941,5950,5954,5962,5973,5981,5992,6002,6011,6018,6034,6044,6049,6061,6072,6082,6088,6094,6100,6106,6118,6128,6133,6145,6155,6160,6175,6184,6190,6195,6207,6217,6225,6236,6247,6258,6263,6279,6288,6294],{"__ignoreMap":14},[501,5661,5662,5665,5667],{"class":503,"line":504},[501,5663,5664],{"class":2106},"name",[501,5666,2111],{"class":2110},[501,5668,5669],{"class":562}," Blog Frontend - Test, Build and Push\n",[501,5671,5672],{"class":503,"line":510},[501,5673,1728],{"emptyLinePlaceholder":757},[501,5675,5676,5680],{"class":503,"line":516},[501,5677,5679],{"class":5678},"sKfHY","on",[501,5681,2132],{"class":2110},[501,5683,5684,5687],{"class":503,"line":1385},[501,5685,5686],{"class":2106},"  workflow_dispatch",[501,5688,2132],{"class":2110},[501,5690,5691,5694],{"class":503,"line":1394},[501,5692,5693],{"class":2106},"  push",[501,5695,2132],{"class":2110},[501,5697,5698,5701],{"class":503,"line":1403},[501,5699,5700],{"class":2106},"    branches",[501,5702,2132],{"class":2110},[501,5704,5705,5708,5710,5712],{"class":503,"line":1415},[501,5706,5707],{"class":2110},"      -",[501,5709,2495],{"class":1983},[501,5711,3179],{"class":562},[501,5713,2759],{"class":1983},[501,5715,5716,5719],{"class":503,"line":1423},[501,5717,5718],{"class":2106},"jobs",[501,5720,2132],{"class":2110},[501,5722,5723,5726],{"class":503,"line":1433},[501,5724,5725],{"class":2106},"  test",[501,5727,2132],{"class":2110},[501,5729,5730,5733,5735],{"class":503,"line":1442},[501,5731,5732],{"class":2106},"    runs-on",[501,5734,2111],{"class":2110},[501,5736,5737],{"class":562}," ubuntu-latest\n",[501,5739,5740],{"class":503,"line":2050},[501,5741,3836],{"class":1346},[501,5743,5744,5747],{"class":503,"line":2203},[501,5745,5746],{"class":2106},"    permissions",[501,5748,2132],{"class":2110},[501,5750,5751,5754,5756],{"class":503,"line":2210},[501,5752,5753],{"class":2106},"      contents",[501,5755,2111],{"class":2110},[501,5757,5758],{"class":562}," read\n",[501,5760,5761,5764,5766],{"class":503,"line":2219},[501,5762,5763],{"class":2106},"      pull-requests",[501,5765,2111],{"class":2110},[501,5767,5768],{"class":562}," write\n",[501,5770,5771],{"class":503,"line":2228},[501,5772,1728],{"emptyLinePlaceholder":757},[501,5774,5775,5778],{"class":503,"line":2237},[501,5776,5777],{"class":2106},"    steps",[501,5779,2132],{"class":2110},[501,5781,5782,5785,5788,5790],{"class":503,"line":2244},[501,5783,5784],{"class":2110},"    -",[501,5786,5787],{"class":2106}," uses",[501,5789,2111],{"class":2110},[501,5791,5792],{"class":562}," actions/checkout@v3\n",[501,5794,5795],{"class":503,"line":2735},[501,5796,1728],{"emptyLinePlaceholder":757},[501,5798,5799,5801,5803,5805,5807,5810],{"class":503,"line":2746},[501,5800,5784],{"class":2110},[501,5802,5239],{"class":2106},[501,5804,2111],{"class":2110},[501,5806,2495],{"class":1983},[501,5808,5809],{"class":562},"Install Node",[501,5811,2759],{"class":1983},[501,5813,5814,5817,5819],{"class":503,"line":2762},[501,5815,5816],{"class":2106},"      uses",[501,5818,2111],{"class":2110},[501,5820,5821],{"class":562}," actions/setup-node@v3\n",[501,5823,5824,5827],{"class":503,"line":2770},[501,5825,5826],{"class":2106},"      with",[501,5828,2132],{"class":2110},[501,5830,5831,5834,5836,5838,5841],{"class":503,"line":2780},[501,5832,5833],{"class":2106},"        node-version",[501,5835,2111],{"class":2110},[501,5837,2495],{"class":1983},[501,5839,5840],{"class":562},"17",[501,5842,2759],{"class":1983},[501,5844,5845],{"class":503,"line":2788},[501,5846,1728],{"emptyLinePlaceholder":757},[501,5848,5849,5851,5853,5855,5857,5860],{"class":503,"line":2799},[501,5850,5784],{"class":2110},[501,5852,5239],{"class":2106},[501,5854,2111],{"class":2110},[501,5856,2495],{"class":1983},[501,5858,5859],{"class":562},"Install Deps",[501,5861,2759],{"class":1983},[501,5863,5864,5867,5869],{"class":503,"line":3513},[501,5865,5866],{"class":2106},"      run",[501,5868,2111],{"class":2110},[501,5870,5871],{"class":1640}," |\n",[501,5873,5874],{"class":503,"line":3525},[501,5875,5876],{"class":562},"        npm install\n",[501,5878,5879],{"class":503,"line":3553},[501,5880,5881],{"class":562},"        npm run build\n",[501,5883,5884],{"class":503,"line":3565},[501,5885,1728],{"emptyLinePlaceholder":757},[501,5887,5888,5890,5892,5894,5896,5898],{"class":503,"line":3581},[501,5889,5784],{"class":2110},[501,5891,5239],{"class":2106},[501,5893,2111],{"class":2110},[501,5895,2495],{"class":1983},[501,5897,764],{"class":562},[501,5899,2759],{"class":1983},[501,5901,5902,5904,5906],{"class":503,"line":3595},[501,5903,5866],{"class":2106},[501,5905,2111],{"class":2110},[501,5907,5908],{"class":562}," npx vitest --coverage\n",[501,5910,5911],{"class":503,"line":3607},[501,5912,1728],{"emptyLinePlaceholder":757},[501,5914,5915,5917,5919,5921,5923,5926],{"class":503,"line":3619},[501,5916,5784],{"class":2110},[501,5918,5239],{"class":2106},[501,5920,2111],{"class":2110},[501,5922,2495],{"class":1983},[501,5924,5925],{"class":562},"Report Coverage",[501,5927,2759],{"class":1983},[501,5929,5930,5933,5935,5938],{"class":503,"line":3631},[501,5931,5932],{"class":2106},"      if",[501,5934,2111],{"class":2110},[501,5936,5937],{"class":562}," always()",[501,5939,5940],{"class":5265}," # Also generate the report if tests are failing\n",[501,5942,5943,5945,5947],{"class":503,"line":3643},[501,5944,5816],{"class":2106},[501,5946,2111],{"class":2110},[501,5948,5949],{"class":562},"  davelosert/vitest-coverage-report-action@v2\n",[501,5951,5952],{"class":503,"line":3655},[501,5953,1728],{"emptyLinePlaceholder":757},[501,5955,5957,5960],{"class":503,"line":5956},36,[501,5958,5959],{"class":2106},"  build-push",[501,5961,2132],{"class":2110},[501,5963,5965,5968,5970],{"class":503,"line":5964},37,[501,5966,5967],{"class":2106},"    needs",[501,5969,2111],{"class":2110},[501,5971,5972],{"class":562}," test\n",[501,5974,5976,5979],{"class":503,"line":5975},38,[501,5977,5978],{"class":2106},"    env",[501,5980,2132],{"class":2110},[501,5982,5984,5987,5989],{"class":503,"line":5983},39,[501,5985,5986],{"class":2106},"      REGISTRY",[501,5988,2111],{"class":2110},[501,5990,5991],{"class":562}," ghcr.io/devozs\n",[501,5993,5995,5998,6000],{"class":503,"line":5994},40,[501,5996,5997],{"class":2106},"      IMAGE",[501,5999,2111],{"class":2110},[501,6001,4439],{"class":562},[501,6003,6005,6007,6009],{"class":503,"line":6004},41,[501,6006,5732],{"class":2106},[501,6008,2111],{"class":2110},[501,6010,5737],{"class":562},[501,6012,6014,6016],{"class":503,"line":6013},42,[501,6015,5777],{"class":2106},[501,6017,2132],{"class":2110},[501,6019,6021,6023,6025,6027,6029,6032],{"class":503,"line":6020},43,[501,6022,5707],{"class":2110},[501,6024,5239],{"class":2106},[501,6026,2111],{"class":2110},[501,6028,1984],{"class":1983},[501,6030,6031],{"class":562},"Checkout GitHub Action",[501,6033,3196],{"class":1983},[501,6035,6037,6040,6042],{"class":503,"line":6036},44,[501,6038,6039],{"class":2106},"        uses",[501,6041,2111],{"class":2110},[501,6043,5792],{"class":562},[501,6045,6047],{"class":503,"line":6046},45,[501,6048,1728],{"emptyLinePlaceholder":757},[501,6050,6052,6054,6056,6058],{"class":503,"line":6051},46,[501,6053,5707],{"class":2110},[501,6055,5239],{"class":2106},[501,6057,2111],{"class":2110},[501,6059,6060],{"class":562}," Generate build ID\n",[501,6062,6064,6067,6069],{"class":503,"line":6063},47,[501,6065,6066],{"class":2106},"        id",[501,6068,2111],{"class":2110},[501,6070,6071],{"class":562}," prep\n",[501,6073,6075,6078,6080],{"class":503,"line":6074},48,[501,6076,6077],{"class":2106},"        run",[501,6079,2111],{"class":2110},[501,6081,5871],{"class":1640},[501,6083,6085],{"class":503,"line":6084},49,[501,6086,6087],{"class":562},"            branch=${GITHUB_REF##*/}\n",[501,6089,6091],{"class":503,"line":6090},50,[501,6092,6093],{"class":562},"            sha=${GITHUB_SHA::8}\n",[501,6095,6097],{"class":503,"line":6096},51,[501,6098,6099],{"class":562},"            ts=$(date +%s)\n",[501,6101,6103],{"class":503,"line":6102},52,[501,6104,6105],{"class":562},"            echo \"BUILD_ID=${branch}-${sha}-${ts}\" >> $GITHUB_OUTPUT\n",[501,6107,6109,6111,6113,6115],{"class":503,"line":6108},53,[501,6110,5707],{"class":2110},[501,6112,5239],{"class":2106},[501,6114,2111],{"class":2110},[501,6116,6117],{"class":562}," Set up QEMU\n",[501,6119,6121,6123,6125],{"class":503,"line":6120},54,[501,6122,6039],{"class":2106},[501,6124,2111],{"class":2110},[501,6126,6127],{"class":562}," docker/setup-qemu-action@v2\n",[501,6129,6131],{"class":503,"line":6130},55,[501,6132,1728],{"emptyLinePlaceholder":757},[501,6134,6136,6138,6140,6142],{"class":503,"line":6135},56,[501,6137,5707],{"class":2110},[501,6139,5239],{"class":2106},[501,6141,2111],{"class":2110},[501,6143,6144],{"class":562}," Set up Docker Buildx\n",[501,6146,6148,6150,6152],{"class":503,"line":6147},57,[501,6149,6039],{"class":2106},[501,6151,2111],{"class":2110},[501,6153,6154],{"class":562}," docker/setup-buildx-action@v2\n",[501,6156,6158],{"class":503,"line":6157},58,[501,6159,1728],{"emptyLinePlaceholder":757},[501,6161,6163,6165,6167,6169,6171,6173],{"class":503,"line":6162},59,[501,6164,5707],{"class":2110},[501,6166,5239],{"class":2106},[501,6168,2111],{"class":2110},[501,6170,1984],{"class":1983},[501,6172,765],{"class":562},[501,6174,3196],{"class":1983},[501,6176,6178,6180,6182],{"class":503,"line":6177},60,[501,6179,6077],{"class":2106},[501,6181,2111],{"class":2110},[501,6183,5871],{"class":1640},[501,6185,6187],{"class":503,"line":6186},61,[501,6188,6189],{"class":562},"          docker build -f Dockerfile . -t ${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n",[501,6191,6193],{"class":503,"line":6192},62,[501,6194,1728],{"emptyLinePlaceholder":757},[501,6196,6198,6200,6202,6204],{"class":503,"line":6197},63,[501,6199,5707],{"class":2110},[501,6201,5239],{"class":2106},[501,6203,2111],{"class":2110},[501,6205,6206],{"class":562}," Log in to the Container registry\n",[501,6208,6210,6212,6214],{"class":503,"line":6209},64,[501,6211,6039],{"class":2106},[501,6213,2111],{"class":2110},[501,6215,6216],{"class":562}," docker/login-action@v2\n",[501,6218,6220,6223],{"class":503,"line":6219},65,[501,6221,6222],{"class":2106},"        with",[501,6224,2132],{"class":2110},[501,6226,6228,6231,6233],{"class":503,"line":6227},66,[501,6229,6230],{"class":2106},"          registry",[501,6232,2111],{"class":2110},[501,6234,6235],{"class":562}," ghcr.io\n",[501,6237,6239,6242,6244],{"class":503,"line":6238},67,[501,6240,6241],{"class":2106},"          username",[501,6243,2111],{"class":2110},[501,6245,6246],{"class":562}," ${{ github.actor }}\n",[501,6248,6250,6253,6255],{"class":503,"line":6249},68,[501,6251,6252],{"class":2106},"          password",[501,6254,2111],{"class":2110},[501,6256,6257],{"class":562}," ${{ secrets.GITHUB_TOKEN }}\n",[501,6259,6261],{"class":503,"line":6260},69,[501,6262,1728],{"emptyLinePlaceholder":757},[501,6264,6266,6268,6270,6272,6274,6277],{"class":503,"line":6265},70,[501,6267,5707],{"class":2110},[501,6269,5239],{"class":2106},[501,6271,2111],{"class":2110},[501,6273,1984],{"class":1983},[501,6275,6276],{"class":562},"Docker Push",[501,6278,3196],{"class":1983},[501,6280,6282,6284,6286],{"class":503,"line":6281},71,[501,6283,6077],{"class":2106},[501,6285,2111],{"class":2110},[501,6287,5871],{"class":1640},[501,6289,6291],{"class":503,"line":6290},72,[501,6292,6293],{"class":562},"          docker tag ${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }} ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n",[501,6295,6297],{"class":503,"line":6296},73,[501,6298,6299],{"class":562},"          docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n",[481,6301,6303],{"id":6302},"setup-action","Setup Action",[16,6305,6306,6307,1467,6312,5290],{},"We've breaken our pipline into two main parts (jobs in GitHub Action terminology): ",[1456,6308,6309],{},[674,6310,6311],{},"test",[1456,6313,6314],{},[674,6315,6316],{},"build-push",[79,6318,6319,6322],{},[37,6320,6321],{},"test: We've implemented simple unit and component tests in this example. These tests are included to demonstrate where and how to place tests before proceeding to the build phase.",[37,6323,6324,6325],{},"build-push: In this phase, we build the container using the Dockerfile described in the previous section and push it to the GitHub registry. This job stars running only after a succesful complition of test phase.\n",[1510,6326],{"alt":1512,"src":6327,"title":1512},"/images/blog/2023/09/08/github-action-diagram.png",[16,6329,6330,6331],{},"You can view list workflows execution\n",[1510,6332],{"alt":1533,"src":6333,"title":1533},"/images/blog/2023/09/08/github-action-list.png",[481,6335,6337],{"id":6336},"unit-compoenent-tests","Unit / Compoenent Tests",[16,6339,6340],{},"Basic testing implementation helps demonstrate a separate phase before triggering the build-push phase. This prevents images from being pushed into the registry in case the tests fail or are invalid.",[12,6342,6343],{"type":1267},[16,6344,6345],{},"This is just an example; in a real-case scenario, there should be many more meaningful funtional and non-functional tests!",[41,6347,6349],{"className":2097,"code":6348,"language":2099,"meta":14,"style":14},"    - name: 'Install Deps'\n      run: |\n        npm install\n        npm run build\n\n    - name: 'Test'\n      run: npx vitest --coverage\n\n    - name: 'Report Coverage'\n      if: always() # Also generate the report if tests are failing\n      uses:  davelosert/vitest-coverage-report-action@v2\n",[48,6350,6351,6365,6373,6377,6381,6385,6399,6407,6411,6425,6435],{"__ignoreMap":14},[501,6352,6353,6355,6357,6359,6361,6363],{"class":503,"line":504},[501,6354,5784],{"class":2110},[501,6356,5239],{"class":2106},[501,6358,2111],{"class":2110},[501,6360,2495],{"class":1983},[501,6362,5859],{"class":562},[501,6364,2759],{"class":1983},[501,6366,6367,6369,6371],{"class":503,"line":510},[501,6368,5866],{"class":2106},[501,6370,2111],{"class":2110},[501,6372,5871],{"class":1640},[501,6374,6375],{"class":503,"line":516},[501,6376,5876],{"class":562},[501,6378,6379],{"class":503,"line":1385},[501,6380,5881],{"class":562},[501,6382,6383],{"class":503,"line":1394},[501,6384,1728],{"emptyLinePlaceholder":757},[501,6386,6387,6389,6391,6393,6395,6397],{"class":503,"line":1403},[501,6388,5784],{"class":2110},[501,6390,5239],{"class":2106},[501,6392,2111],{"class":2110},[501,6394,2495],{"class":1983},[501,6396,764],{"class":562},[501,6398,2759],{"class":1983},[501,6400,6401,6403,6405],{"class":503,"line":1415},[501,6402,5866],{"class":2106},[501,6404,2111],{"class":2110},[501,6406,5908],{"class":562},[501,6408,6409],{"class":503,"line":1423},[501,6410,1728],{"emptyLinePlaceholder":757},[501,6412,6413,6415,6417,6419,6421,6423],{"class":503,"line":1433},[501,6414,5784],{"class":2110},[501,6416,5239],{"class":2106},[501,6418,2111],{"class":2110},[501,6420,2495],{"class":1983},[501,6422,5925],{"class":562},[501,6424,2759],{"class":1983},[501,6426,6427,6429,6431,6433],{"class":503,"line":1442},[501,6428,5932],{"class":2106},[501,6430,2111],{"class":2110},[501,6432,5937],{"class":562},[501,6434,5940],{"class":5265},[501,6436,6437,6439,6441],{"class":503,"line":2050},[501,6438,5816],{"class":2106},[501,6440,2111],{"class":2110},[501,6442,5949],{"class":562},[16,6444,6445],{},"Tests results on GitHub Actions:",[16,6447,6448],{},[1510,6449],{"alt":6450,"src":6451,"title":6450},"GitHub Action Tests","/images/blog/2023/09/09/github-actions-tests.png",[16,6453,6454],{},"Running tests locally:",[41,6456,6458],{"className":549,"code":6457,"language":551,"meta":14,"style":14},"npm run coverage\n\n> coverage\n> vitest run --coverage\n\n\n RUN  v0.34.4 /home/devozs/workspace/sandbox/blog-frontend\n      Coverage enabled with v8\n\n ✓ tests/imports.test.ts (2)\n   ✓ import vue components (2)\n     ✓ normal imports as expected\n     ✓ dynamic imports as expected\n\n Test Files  1 passed (1)\n      Tests  2 passed (2)\n   Start at  00:22:38\n   Duration  1.03s (transform 83ms, setup 0ms, collect 21ms, tests 279ms, environment 0ms, prepare 89ms)\n\n % Coverage report from v8\n-------------|---------|----------|---------|---------|-------------------\nFile         | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s \n-------------|---------|----------|---------|---------|-------------------\nAll files    |     100 |      100 |     100 |     100 |                   \n InfoBox.vue |     100 |      100 |     100 |     100 |                   \n-------------|---------|----------|---------|---------|-------------------\n\n",[48,6459,6460,6470,6474,6480,6487,6491,6495,6505,6519,6523,6534,6549,6566,6579,6583,6600,6612,6622,6667,6671,6686,6715,6761,6785,6817,6842],{"__ignoreMap":14},[501,6461,6462,6465,6467],{"class":503,"line":504},[501,6463,6464],{"class":558},"npm",[501,6466,597],{"class":562},[501,6468,6469],{"class":562}," coverage\n",[501,6471,6472],{"class":503,"line":510},[501,6473,1728],{"emptyLinePlaceholder":757},[501,6475,6476,6478],{"class":503,"line":516},[501,6477,3130],{"class":1640},[501,6479,6469],{"class":1346},[501,6481,6482,6484],{"class":503,"line":1385},[501,6483,3130],{"class":1640},[501,6485,6486],{"class":1346}," vitest run --coverage\n",[501,6488,6489],{"class":503,"line":1394},[501,6490,1728],{"emptyLinePlaceholder":757},[501,6492,6493],{"class":503,"line":1403},[501,6494,1728],{"emptyLinePlaceholder":757},[501,6496,6497,6499,6502],{"class":503,"line":1415},[501,6498,4944],{"class":558},[501,6500,6501],{"class":562},"  v0.34.4",[501,6503,6504],{"class":562}," /home/devozs/workspace/sandbox/blog-frontend\n",[501,6506,6507,6510,6513,6516],{"class":503,"line":1423},[501,6508,6509],{"class":558},"      Coverage",[501,6511,6512],{"class":562}," enabled",[501,6514,6515],{"class":562}," with",[501,6517,6518],{"class":562}," v8\n",[501,6520,6521],{"class":503,"line":1433},[501,6522,1728],{"emptyLinePlaceholder":757},[501,6524,6525,6528,6531],{"class":503,"line":1442},[501,6526,6527],{"class":558}," ✓",[501,6529,6530],{"class":562}," tests/imports.test.ts",[501,6532,6533],{"class":1346}," (2)\n",[501,6535,6536,6539,6542,6545,6547],{"class":503,"line":2050},[501,6537,6538],{"class":558},"   ✓",[501,6540,6541],{"class":562}," import",[501,6543,6544],{"class":562}," vue",[501,6546,3293],{"class":562},[501,6548,6533],{"class":1346},[501,6550,6551,6554,6557,6560,6563],{"class":503,"line":2203},[501,6552,6553],{"class":558},"     ✓",[501,6555,6556],{"class":562}," normal",[501,6558,6559],{"class":562}," imports",[501,6561,6562],{"class":562}," as",[501,6564,6565],{"class":562}," expected\n",[501,6567,6568,6570,6573,6575,6577],{"class":503,"line":2210},[501,6569,6553],{"class":558},[501,6571,6572],{"class":562}," dynamic",[501,6574,6559],{"class":562},[501,6576,6562],{"class":562},[501,6578,6565],{"class":562},[501,6580,6581],{"class":503,"line":2219},[501,6582,1728],{"emptyLinePlaceholder":757},[501,6584,6585,6588,6591,6594,6597],{"class":503,"line":2228},[501,6586,6587],{"class":558}," Test",[501,6589,6590],{"class":562}," Files",[501,6592,6593],{"class":1576},"  1",[501,6595,6596],{"class":562}," passed",[501,6598,6599],{"class":1346}," (1)\n",[501,6601,6602,6605,6608,6610],{"class":503,"line":2237},[501,6603,6604],{"class":558},"      Tests",[501,6606,6607],{"class":1576},"  2",[501,6609,6596],{"class":562},[501,6611,6533],{"class":1346},[501,6613,6614,6617,6619],{"class":503,"line":2244},[501,6615,6616],{"class":558},"   Start",[501,6618,4991],{"class":562},[501,6620,6621],{"class":562},"  00:22:38\n",[501,6623,6624,6627,6630,6633,6636,6639,6642,6645,6648,6651,6654,6657,6659,6662,6665],{"class":503,"line":2735},[501,6625,6626],{"class":558},"   Duration",[501,6628,6629],{"class":562},"  1.03s",[501,6631,6632],{"class":1346}," (transform ",[501,6634,6635],{"class":562},"83ms,",[501,6637,6638],{"class":562}," setup",[501,6640,6641],{"class":562}," 0ms,",[501,6643,6644],{"class":562}," collect",[501,6646,6647],{"class":562}," 21ms,",[501,6649,6650],{"class":562}," tests",[501,6652,6653],{"class":562}," 279ms,",[501,6655,6656],{"class":562}," environment",[501,6658,6641],{"class":562},[501,6660,6661],{"class":562}," prepare",[501,6663,6664],{"class":562}," 89ms",[501,6666,805],{"class":1346},[501,6668,6669],{"class":503,"line":2746},[501,6670,1728],{"emptyLinePlaceholder":757},[501,6672,6673,6676,6679,6682,6684],{"class":503,"line":2762},[501,6674,6675],{"class":558}," %",[501,6677,6678],{"class":562}," Coverage",[501,6680,6681],{"class":562}," report",[501,6683,2507],{"class":562},[501,6685,6518],{"class":562},[501,6687,6688,6691,6694,6697,6699,6702,6704,6706,6708,6710,6712],{"class":503,"line":2770},[501,6689,6690],{"class":558},"-------------",[501,6692,6693],{"class":1640},"|",[501,6695,6696],{"class":558},"---------",[501,6698,6693],{"class":1640},[501,6700,6701],{"class":558},"----------",[501,6703,6693],{"class":1640},[501,6705,6696],{"class":558},[501,6707,6693],{"class":1640},[501,6709,6696],{"class":558},[501,6711,6693],{"class":1640},[501,6713,6714],{"class":558},"-------------------\n",[501,6716,6717,6720,6723,6725,6728,6731,6733,6736,6738,6740,6743,6745,6747,6750,6752,6755,6758],{"class":503,"line":2780},[501,6718,6719],{"class":558},"File",[501,6721,6722],{"class":1640},"         |",[501,6724,6675],{"class":558},[501,6726,6727],{"class":562}," Stmts",[501,6729,6730],{"class":1640}," |",[501,6732,6675],{"class":558},[501,6734,6735],{"class":562}," Branch",[501,6737,6730],{"class":1640},[501,6739,6675],{"class":558},[501,6741,6742],{"class":562}," Funcs",[501,6744,6730],{"class":1640},[501,6746,6675],{"class":558},[501,6748,6749],{"class":562}," Lines",[501,6751,6730],{"class":1640},[501,6753,6754],{"class":558}," Uncovered",[501,6756,6757],{"class":562}," Line",[501,6759,6760],{"class":5265}," #s \n",[501,6762,6763,6765,6767,6769,6771,6773,6775,6777,6779,6781,6783],{"class":503,"line":2788},[501,6764,6690],{"class":558},[501,6766,6693],{"class":1640},[501,6768,6696],{"class":558},[501,6770,6693],{"class":1640},[501,6772,6701],{"class":558},[501,6774,6693],{"class":1640},[501,6776,6696],{"class":558},[501,6778,6693],{"class":1640},[501,6780,6696],{"class":558},[501,6782,6693],{"class":1640},[501,6784,6714],{"class":558},[501,6786,6787,6790,6793,6796,6799,6801,6804,6806,6808,6810,6812,6814],{"class":503,"line":2799},[501,6788,6789],{"class":558},"All",[501,6791,6792],{"class":562}," files",[501,6794,6795],{"class":1640},"    |",[501,6797,6798],{"class":558},"     100",[501,6800,6730],{"class":1640},[501,6802,6803],{"class":558},"      100",[501,6805,6730],{"class":1640},[501,6807,6798],{"class":558},[501,6809,6730],{"class":1640},[501,6811,6798],{"class":558},[501,6813,6730],{"class":1640},[501,6815,6816],{"class":1346},"                   \n",[501,6818,6819,6822,6824,6826,6828,6830,6832,6834,6836,6838,6840],{"class":503,"line":3513},[501,6820,6821],{"class":558}," InfoBox.vue",[501,6823,6730],{"class":1640},[501,6825,6798],{"class":558},[501,6827,6730],{"class":1640},[501,6829,6803],{"class":558},[501,6831,6730],{"class":1640},[501,6833,6798],{"class":558},[501,6835,6730],{"class":1640},[501,6837,6798],{"class":558},[501,6839,6730],{"class":1640},[501,6841,6816],{"class":1346},[501,6843,6844,6846,6848,6850,6852,6854,6856,6858,6860,6862,6864],{"class":503,"line":3525},[501,6845,6690],{"class":558},[501,6847,6693],{"class":1640},[501,6849,6696],{"class":558},[501,6851,6693],{"class":1640},[501,6853,6701],{"class":558},[501,6855,6693],{"class":1640},[501,6857,6696],{"class":558},[501,6859,6693],{"class":1640},[501,6861,6696],{"class":558},[501,6863,6693],{"class":1640},[501,6865,6714],{"class":558},[481,6867,6869],{"id":6868},"build-docker","Build Docker",[16,6871,6872],{},"We are using the branch name, commit SHA, and timestamp to compose the image tag (we'll use this later as part of the continuous deployment tutorial).",[12,6874,6875,6878],{"type":2065},[16,6876,6877],{},"Don't use your Docker credentials as plain text!",[1618,6879,6880],{"v-slot:details":14},[16,6881,6882],{},"Keep the username and passwords as secrets or use another method to ensure they are not visible as plain text in your pipeline (I've used GitHub secrets).",[16,6884,6885,6886,6891,6892,6897],{},"We are building the image using the ",[1456,6887,6888],{},[674,6889,6890],{},"docker build"," command against the Dockerfile mentioned above and tagging it with ",[1456,6893,6894],{},[674,6895,6896],{},"-t"," using the tagging logic described earlier.",[41,6899,6901],{"className":549,"code":6900,"language":551,"meta":14,"style":14},"      - name: \"Build\"\n        run: |\n          docker build -f Dockerfile . -t ${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n",[48,6902,6903,6916,6923],{"__ignoreMap":14},[501,6904,6905,6907,6910,6912,6914],{"class":503,"line":504},[501,6906,5707],{"class":558},[501,6908,6909],{"class":562}," name:",[501,6911,1984],{"class":1983},[501,6913,765],{"class":562},[501,6915,3196],{"class":1983},[501,6917,6918,6921],{"class":503,"line":510},[501,6919,6920],{"class":558},"        run:",[501,6922,5871],{"class":1640},[501,6924,6925,6928,6930,6933,6936,6939,6941,6944,6947,6950,6952,6955,6958,6961,6964,6966,6969,6971,6974,6976,6979,6981,6984,6986],{"class":503,"line":516},[501,6926,6927],{"class":558},"          docker",[501,6929,563],{"class":562},[501,6931,6932],{"class":566}," -f",[501,6934,6935],{"class":562}," Dockerfile",[501,6937,6938],{"class":562}," .",[501,6940,567],{"class":566},[501,6942,6943],{"class":4978}," ${",[501,6945,6946],{"class":1346},"{ ",[501,6948,6949],{"class":1644},"env",[501,6951,5290],{"class":1346},[501,6953,6954],{"class":1644},"IMAGE",[501,6956,6957],{"class":4978}," }",[501,6959,6960],{"class":562},"}:",[501,6962,6963],{"class":4978},"${",[501,6965,6946],{"class":1346},[501,6967,6968],{"class":1644},"steps",[501,6970,5290],{"class":1346},[501,6972,6973],{"class":1644},"prep",[501,6975,5290],{"class":1346},[501,6977,6978],{"class":1644},"outputs",[501,6980,5290],{"class":1346},[501,6982,6983],{"class":1644},"BUILD_ID",[501,6985,6957],{"class":4978},[501,6987,6988],{"class":562},"}\n",[481,6990,6992],{"id":6991},"push-to-registry","Push to Registry",[16,6994,6995],{},"Login is required for GitHub Packages access with write permissions since we are pushing an image to the registry.",[16,6997,6998,6999,7004,7005,5290],{},"Then we use the images created in the previous step, tag them with the GitHub Container Registry prefix and/or the organization (ghcr.io/devozs) using the ",[1456,7000,7001],{},[674,7002,7003],{},"docker tag"," command, and finally push them into the registry with ",[1456,7006,7007],{},[674,7008,7009],{},"docker push",[41,7011,7013],{"className":549,"code":7012,"language":551,"meta":14,"style":14},"      - name: \"Build\"\n        run: |\n          docker build -f Dockerfile . -t ${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n\n      - name: Log in to the Container registry\n        uses: docker/login-action@v2\n        with:\n          registry: ghcr.io\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - name: \"Docker Push\"\n        run: |\n          docker tag ${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }} ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n          docker push ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.prep.outputs.BUILD_ID }}\n",[48,7014,7015,7027,7033,7083,7087,7109,7116,7121,7128,7149,7169,7173,7185,7191,7286],{"__ignoreMap":14},[501,7016,7017,7019,7021,7023,7025],{"class":503,"line":504},[501,7018,5707],{"class":558},[501,7020,6909],{"class":562},[501,7022,1984],{"class":1983},[501,7024,765],{"class":562},[501,7026,3196],{"class":1983},[501,7028,7029,7031],{"class":503,"line":510},[501,7030,6920],{"class":558},[501,7032,5871],{"class":1640},[501,7034,7035,7037,7039,7041,7043,7045,7047,7049,7051,7053,7055,7057,7059,7061,7063,7065,7067,7069,7071,7073,7075,7077,7079,7081],{"class":503,"line":516},[501,7036,6927],{"class":558},[501,7038,563],{"class":562},[501,7040,6932],{"class":566},[501,7042,6935],{"class":562},[501,7044,6938],{"class":562},[501,7046,567],{"class":566},[501,7048,6943],{"class":4978},[501,7050,6946],{"class":1346},[501,7052,6949],{"class":1644},[501,7054,5290],{"class":1346},[501,7056,6954],{"class":1644},[501,7058,6957],{"class":4978},[501,7060,6960],{"class":562},[501,7062,6963],{"class":4978},[501,7064,6946],{"class":1346},[501,7066,6968],{"class":1644},[501,7068,5290],{"class":1346},[501,7070,6973],{"class":1644},[501,7072,5290],{"class":1346},[501,7074,6978],{"class":1644},[501,7076,5290],{"class":1346},[501,7078,6983],{"class":1644},[501,7080,6957],{"class":4978},[501,7082,6988],{"class":562},[501,7084,7085],{"class":503,"line":1385},[501,7086,1728],{"emptyLinePlaceholder":757},[501,7088,7089,7091,7093,7096,7098,7100,7103,7106],{"class":503,"line":1394},[501,7090,5707],{"class":558},[501,7092,6909],{"class":562},[501,7094,7095],{"class":562}," Log",[501,7097,3296],{"class":562},[501,7099,2513],{"class":562},[501,7101,7102],{"class":562}," the",[501,7104,7105],{"class":562}," Container",[501,7107,7108],{"class":562}," registry\n",[501,7110,7111,7114],{"class":503,"line":1403},[501,7112,7113],{"class":558},"        uses:",[501,7115,6216],{"class":562},[501,7117,7118],{"class":503,"line":1415},[501,7119,7120],{"class":558},"        with:\n",[501,7122,7123,7126],{"class":503,"line":1423},[501,7124,7125],{"class":558},"          registry:",[501,7127,6235],{"class":562},[501,7129,7130,7133,7135,7137,7140,7142,7145,7147],{"class":503,"line":1433},[501,7131,7132],{"class":558},"          username:",[501,7134,6943],{"class":4978},[501,7136,6946],{"class":1346},[501,7138,7139],{"class":1644},"github",[501,7141,5290],{"class":1346},[501,7143,7144],{"class":1644},"actor",[501,7146,6957],{"class":4978},[501,7148,6988],{"class":562},[501,7150,7151,7154,7156,7158,7160,7162,7165,7167],{"class":503,"line":1442},[501,7152,7153],{"class":558},"          password:",[501,7155,6943],{"class":4978},[501,7157,6946],{"class":1346},[501,7159,2058],{"class":1644},[501,7161,5290],{"class":1346},[501,7163,7164],{"class":1644},"GITHUB_TOKEN",[501,7166,6957],{"class":4978},[501,7168,6988],{"class":562},[501,7170,7171],{"class":503,"line":2050},[501,7172,1728],{"emptyLinePlaceholder":757},[501,7174,7175,7177,7179,7181,7183],{"class":503,"line":2203},[501,7176,5707],{"class":558},[501,7178,6909],{"class":562},[501,7180,1984],{"class":1983},[501,7182,6276],{"class":562},[501,7184,3196],{"class":1983},[501,7186,7187,7189],{"class":503,"line":2210},[501,7188,6920],{"class":558},[501,7190,5871],{"class":1640},[501,7192,7193,7195,7197,7199,7201,7203,7205,7207,7209,7211,7213,7215,7217,7219,7221,7223,7225,7227,7229,7231,7234,7236,7238,7240,7242,7245,7247,7250,7252,7254,7256,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284],{"class":503,"line":2219},[501,7194,6927],{"class":558},[501,7196,2489],{"class":562},[501,7198,6943],{"class":4978},[501,7200,6946],{"class":1346},[501,7202,6949],{"class":1644},[501,7204,5290],{"class":1346},[501,7206,6954],{"class":1644},[501,7208,6957],{"class":4978},[501,7210,6960],{"class":562},[501,7212,6963],{"class":4978},[501,7214,6946],{"class":1346},[501,7216,6968],{"class":1644},[501,7218,5290],{"class":1346},[501,7220,6973],{"class":1644},[501,7222,5290],{"class":1346},[501,7224,6978],{"class":1644},[501,7226,5290],{"class":1346},[501,7228,6983],{"class":1644},[501,7230,6957],{"class":4978},[501,7232,7233],{"class":562},"}",[501,7235,6943],{"class":4978},[501,7237,6946],{"class":1346},[501,7239,6949],{"class":1644},[501,7241,5290],{"class":1346},[501,7243,7244],{"class":1644},"REGISTRY",[501,7246,6957],{"class":4978},[501,7248,7249],{"class":562},"}/",[501,7251,6963],{"class":4978},[501,7253,6946],{"class":1346},[501,7255,6949],{"class":1644},[501,7257,5290],{"class":1346},[501,7259,6954],{"class":1644},[501,7261,6957],{"class":4978},[501,7263,6960],{"class":562},[501,7265,6963],{"class":4978},[501,7267,6946],{"class":1346},[501,7269,6968],{"class":1644},[501,7271,5290],{"class":1346},[501,7273,6973],{"class":1644},[501,7275,5290],{"class":1346},[501,7277,6978],{"class":1644},[501,7279,5290],{"class":1346},[501,7281,6983],{"class":1644},[501,7283,6957],{"class":4978},[501,7285,6988],{"class":562},[501,7287,7288,7290,7293,7295,7297,7299,7301,7303,7305,7307,7309,7311,7313,7315,7317,7319,7321,7323,7325,7327,7329,7331,7333,7335,7337,7339,7341],{"class":503,"line":2228},[501,7289,6927],{"class":558},[501,7291,7292],{"class":562}," push",[501,7294,6943],{"class":4978},[501,7296,6946],{"class":1346},[501,7298,6949],{"class":1644},[501,7300,5290],{"class":1346},[501,7302,7244],{"class":1644},[501,7304,6957],{"class":4978},[501,7306,7249],{"class":562},[501,7308,6963],{"class":4978},[501,7310,6946],{"class":1346},[501,7312,6949],{"class":1644},[501,7314,5290],{"class":1346},[501,7316,6954],{"class":1644},[501,7318,6957],{"class":4978},[501,7320,6960],{"class":562},[501,7322,6963],{"class":4978},[501,7324,6946],{"class":1346},[501,7326,6968],{"class":1644},[501,7328,5290],{"class":1346},[501,7330,6973],{"class":1644},[501,7332,5290],{"class":1346},[501,7334,6978],{"class":1644},[501,7336,5290],{"class":1346},[501,7338,6983],{"class":1644},[501,7340,6957],{"class":4978},[501,7342,6988],{"class":562},[29,7344,4329],{"id":4328},[16,7346,7347,7348],{},"Verify that the image exists in GitHub Packages (or any other container registry you are working with) with the relevant tag.\n",[1510,7349],{"alt":7350,"src":7351,"title":7352},"Alt text","/images/blog/2023/09/08/blog-frontend-image.png","blog-frontend image in Github Registry",[16,7354,7355],{},"You can try and pull it, for example:",[41,7357,7359],{"className":549,"code":7358,"language":551,"meta":14,"style":14},"docker pull ghcr.io/\u003CYOUR_ORG>/blog-frontend:main-fc611440-1694297249\n",[48,7360,7361],{"__ignoreMap":14},[501,7362,7363,7365,7368,7371,7373,7376,7379,7381],{"class":503,"line":504},[501,7364,559],{"class":558},[501,7366,7367],{"class":562}," pull",[501,7369,7370],{"class":562}," ghcr.io/",[501,7372,3124],{"class":1640},[501,7374,7375],{"class":562},"YOUR_OR",[501,7377,7378],{"class":1346},"G",[501,7380,3130],{"class":1640},[501,7382,7383],{"class":562},"/blog-frontend:main-fc611440-1694297249\n",[725,7385,7386],{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .skFRX, html code.shiki .skFRX{--shiki-default:#8FBCBB;--shiki-dark:#85E89D;--shiki-sepia:#F92672}html pre.shiki code .sUaCP, html code.shiki .sUaCP{--shiki-default:#ECEFF4;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .siq7d, html code.shiki .siq7d{--shiki-default:#A3BE8C;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sKfHY, html code.shiki .sKfHY{--shiki-default:#81A1C1;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .sQE_P, html code.shiki .sQE_P{--shiki-default:#ECEFF4;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sw3Zv, html code.shiki .sw3Zv{--shiki-default:#D8DEE9FF;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .s4BcI, html code.shiki .s4BcI{--shiki-default:#81A1C1;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .sr5Cr, html code.shiki .sr5Cr{--shiki-default:#616E88;--shiki-dark:#6A737D;--shiki-sepia:#88846F}html pre.shiki code .sNHwn, html code.shiki .sNHwn{--shiki-default:#88C0D0;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .sX_qU, html code.shiki .sX_qU{--shiki-default:#B48EAD;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .sqTyp, html code.shiki .sqTyp{--shiki-default:#A3BE8C;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .sDxrV, html code.shiki .sDxrV{--shiki-default:#81A1C1;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sn_7u, html code.shiki .sn_7u{--shiki-default:#D8DEE9;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}",{"title":14,"searchDepth":510,"depth":510,"links":7388},[7389,7390,7391,7397],{"id":1246,"depth":510,"text":1247},{"id":5543,"depth":510,"text":5544},{"id":5629,"depth":510,"text":5630,"children":7392},[7393,7394,7395,7396],{"id":6302,"depth":516,"text":6303},{"id":6336,"depth":516,"text":6337},{"id":6868,"depth":516,"text":6869},{"id":6991,"depth":516,"text":6992},{"id":4328,"depth":510,"text":4329},"./ci.png","2023-09-09T08:00:00.000Z","CI, Test, Build, Docker, ContainerRegistry, GitHub",{"published":757},"/blog/2023/09/09/continuence-integration",{"title":5502,"description":5507},"continuence-integration","blog/2023/09/09/continuence-integration",[763,764,765,766,7407,2837],"ContainerRegistry","1HE64ECi3v6DCK-Wj3K4sX9wpsdTk3MIqfSYBBoP99Q",{"id":7410,"title":7411,"author":7,"body":7412,"cover":8046,"date":8047,"description":7416,"draft":752,"excerpt":753,"extension":754,"github":8048,"keywords":8049,"meta":8050,"navigation":757,"path":8051,"seo":8052,"shortDesc":753,"slug":8053,"stem":8054,"tags":8055,"video":753,"__hash__":8058},"blog/blog/2023/09/08/Infrastructure-azure-terraform.md","Infrastructure As Code",{"type":9,"value":7413,"toc":8039},[7414,7417,7419,7422,7436,7439,7442,7469,7477,7480,7490,7560,7564,7567,7658,7790,7792,7800,7843,7846,7904,7907,8001,8005,8033,8036],[16,7415,7416],{},"In the upcoming blog post, we will establish the foundational infrastructure that will be pivotal throughout the remaining CI & CD tutorials.",[29,7418,1247],{"id":1246},[16,7420,7421],{},"For this purpose, I've opted to utilize Azure Kubernetes Service (AKS) and Terraform. However, it's worth noting that you have the flexibility to choose from a variety of providers, including GCP, EKS, or any other Kubernetes service that suits your needs.",[12,7423,7424,7427],{"type":1267},[16,7425,7426],{},"Persisting Terraform State!",[1618,7428,7429],{"v-slot:details":14},[16,7430,7431,7432],{},"I'm utilizing Azure Blob Storage as the backend for storing the Terraform state, but it's important to mention that you have the option to select an alternative backend or even forgo state persistence altogether.",[19,7433,1287],{"href":7434,"rel":7435},"https://developer.hashicorp.com/terraform/language/settings/backends/configuration",[23],[29,7437,1223],{"id":7438},"terraform",[16,7440,7441],{},"We are about to buildthe following:",[79,7443,7444,7447,7458],{},[37,7445,7446],{},"Simple AKS",[37,7448,7449,7450],{},"Terrafor will create for us two resource groups:\n",[79,7451,7452,7455],{},[37,7453,7454],{},"one to hold AKS itself (and other resources like key vault for example if being used)",[37,7456,7457],{},"the second for node pools, load balancer, volumes etc.",[37,7459,7460,7461],{},"We have devided it into two node pools:\n",[79,7462,7463,7466],{},[37,7464,7465],{},"System PODs (only_critical_addons_enabled)",[37,7467,7468],{},"Management PODs (our application).",[16,7470,7471,7472],{},"More information about Terraform and AKS can be found ",[19,7473,7476],{"href":7474,"rel":7475},"https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kubernetes_cluster",[23],"Here",[16,7478,7479],{},"Update azure/aks/variables.tf and azure/environment/dev/backend.conf files.",[12,7481,7482,7485],{"type":1267},[16,7483,7484],{},"Cloud provide CLI init",[1618,7486,7487],{"v-slot:details":14},[16,7488,7489],{},"Before executing Terraform CLI make sure to login to init the relevant provider (i.e. az login, gcloud init etc.) depends on the backend you are using.",[41,7491,7493],{"className":549,"code":7492,"language":551,"meta":14,"style":14},"cd infra/terraform/azure\nterraform -chdir='aks' init -backend-config=../environment/dev/backend.conf -reconfigure\nterraform -chdir='aks' plan -var-file=../environment/dev/.tfvars\nterraform -chdir='aks' apply -var-file=../environment/dev/.tfvars\n",[48,7494,7495,7502,7525,7543],{"__ignoreMap":14},[501,7496,7497,7499],{"class":503,"line":504},[501,7498,894],{"class":893},[501,7500,7501],{"class":562}," infra/terraform/azure\n",[501,7503,7504,7506,7509,7511,7514,7516,7519,7522],{"class":503,"line":510},[501,7505,7438],{"class":558},[501,7507,7508],{"class":566}," -chdir=",[501,7510,2501],{"class":1983},[501,7512,7513],{"class":562},"aks",[501,7515,2501],{"class":1983},[501,7517,7518],{"class":562}," init",[501,7520,7521],{"class":566}," -backend-config=../environment/dev/backend.conf",[501,7523,7524],{"class":566}," -reconfigure\n",[501,7526,7527,7529,7531,7533,7535,7537,7540],{"class":503,"line":516},[501,7528,7438],{"class":558},[501,7530,7508],{"class":566},[501,7532,2501],{"class":1983},[501,7534,7513],{"class":562},[501,7536,2501],{"class":1983},[501,7538,7539],{"class":562}," plan",[501,7541,7542],{"class":566}," -var-file=../environment/dev/.tfvars\n",[501,7544,7545,7547,7549,7551,7553,7555,7558],{"class":503,"line":1385},[501,7546,7438],{"class":558},[501,7548,7508],{"class":566},[501,7550,2501],{"class":1983},[501,7552,7513],{"class":562},[501,7554,2501],{"class":1983},[501,7556,7557],{"class":562}," apply",[501,7559,7542],{"class":566},[29,7561,7563],{"id":7562},"azure-kubernetes-service","Azure Kubernetes Service",[16,7565,7566],{},"If everything went well at the prevois step you should have a working AKS.\nGo to Azure portal and search for AKS instances or use the Azure CLI and kubectl.",[41,7568,7570],{"className":549,"code":7569,"language":551,"meta":14,"style":14},"az aks list\n\n[\n  {\n    \"aadProfile\": null,\n    \"addonProfiles\": null,\n    \"agentPoolProfiles\": [\n      {}\n    ]\n  }\n  ...\n]\n",[48,7571,7572,7581,7585,7590,7595,7608,7619,7633,7638,7643,7648,7653],{"__ignoreMap":14},[501,7573,7574,7576,7578],{"class":503,"line":504},[501,7575,2985],{"class":558},[501,7577,2988],{"class":562},[501,7579,7580],{"class":562}," list\n",[501,7582,7583],{"class":503,"line":510},[501,7584,1728],{"emptyLinePlaceholder":757},[501,7586,7587],{"class":503,"line":516},[501,7588,7589],{"class":2110},"[\n",[501,7591,7592],{"class":503,"line":1385},[501,7593,7594],{"class":1346},"  {\n",[501,7596,7597,7600,7603,7605],{"class":503,"line":1394},[501,7598,7599],{"class":1983},"    \"",[501,7601,7602],{"class":562},"aadProfile",[501,7604,1990],{"class":1983},[501,7606,7607],{"class":1346},": null,\n",[501,7609,7610,7612,7615,7617],{"class":503,"line":1403},[501,7611,7599],{"class":1983},[501,7613,7614],{"class":562},"addonProfiles",[501,7616,1990],{"class":1983},[501,7618,7607],{"class":1346},[501,7620,7621,7623,7626,7628,7631],{"class":503,"line":1415},[501,7622,7599],{"class":1983},[501,7624,7625],{"class":562},"agentPoolProfiles",[501,7627,1990],{"class":1983},[501,7629,7630],{"class":1346},": ",[501,7632,7589],{"class":2110},[501,7634,7635],{"class":503,"line":1423},[501,7636,7637],{"class":1346},"      {}\n",[501,7639,7640],{"class":503,"line":1433},[501,7641,7642],{"class":2110},"    ]\n",[501,7644,7645],{"class":503,"line":1442},[501,7646,7647],{"class":1346},"  }\n",[501,7649,7650],{"class":503,"line":2050},[501,7651,7652],{"class":1346},"  ...\n",[501,7654,7655],{"class":503,"line":2203},[501,7656,7657],{"class":2110},"]\n",[41,7659,7661],{"className":549,"code":7660,"language":551,"meta":14,"style":14},"kubectl get nodes -owide\n\nNAME                                 STATUS   ROLES   AGE   VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME\naks-management-41779884-vmss000001   Ready    agent   15s   v1.26.6   10.224.0.100   \u003Cnone>        Ubuntu 22.04.3 LTS   5.15.0-1042-azure   containerd://1.7.1+azure-1\naks-system-18952855-vmss000000       Ready    agent   29h   v1.26.6   10.224.0.4     \u003Cnone>        Ubuntu 22.04.3 LTS   5.15.0-1042-azure   containerd://1.7.1+azure-1\n\n",[48,7662,7663,7675,7679,7710,7754],{"__ignoreMap":14},[501,7664,7665,7667,7669,7672],{"class":503,"line":504},[501,7666,1711],{"class":558},[501,7668,1714],{"class":562},[501,7670,7671],{"class":562}," nodes",[501,7673,7674],{"class":566}," -owide\n",[501,7676,7677],{"class":503,"line":510},[501,7678,1728],{"emptyLinePlaceholder":757},[501,7680,7681,7683,7686,7689,7692,7695,7698,7701,7704,7707],{"class":503,"line":516},[501,7682,1733],{"class":558},[501,7684,7685],{"class":562},"                                 STATUS",[501,7687,7688],{"class":562},"   ROLES",[501,7690,7691],{"class":562},"   AGE",[501,7693,7694],{"class":562},"   VERSION",[501,7696,7697],{"class":562},"   INTERNAL-IP",[501,7699,7700],{"class":562},"    EXTERNAL-IP",[501,7702,7703],{"class":562},"   OS-IMAGE",[501,7705,7706],{"class":562},"             KERNEL-VERSION",[501,7708,7709],{"class":562},"      CONTAINER-RUNTIME\n",[501,7711,7712,7715,7718,7721,7724,7727,7730,7733,7735,7737,7739,7742,7745,7748,7751],{"class":503,"line":1385},[501,7713,7714],{"class":558},"aks-management-41779884-vmss000001",[501,7716,7717],{"class":562},"   Ready",[501,7719,7720],{"class":562},"    agent",[501,7722,7723],{"class":562},"   15s",[501,7725,7726],{"class":562},"   v1.26.6",[501,7728,7729],{"class":1576},"   10.224.0.100",[501,7731,7732],{"class":1640},"   \u003C",[501,7734,5438],{"class":562},[501,7736,5441],{"class":1346},[501,7738,3130],{"class":1640},[501,7740,7741],{"class":562},"        Ubuntu",[501,7743,7744],{"class":1576}," 22.04.3",[501,7746,7747],{"class":562}," LTS",[501,7749,7750],{"class":562},"   5.15.0-1042-azure",[501,7752,7753],{"class":562},"   containerd://1.7.1+azure-1\n",[501,7755,7756,7759,7762,7764,7767,7769,7772,7774,7776,7778,7780,7782,7784,7786,7788],{"class":503,"line":1394},[501,7757,7758],{"class":558},"aks-system-18952855-vmss000000",[501,7760,7761],{"class":562},"       Ready",[501,7763,7720],{"class":562},[501,7765,7766],{"class":562},"   29h",[501,7768,7726],{"class":562},[501,7770,7771],{"class":1576},"   10.224.0.4",[501,7773,5435],{"class":1640},[501,7775,5438],{"class":562},[501,7777,5441],{"class":1346},[501,7779,3130],{"class":1640},[501,7781,7741],{"class":562},[501,7783,7744],{"class":1576},[501,7785,7747],{"class":562},[501,7787,7750],{"class":562},[501,7789,7753],{"class":562},[29,7791,4329],{"id":4328},[16,7793,7794,7795],{},"We`ll be a simple web application just to test a POD deployment.\n",[19,7796,7799],{"href":7797,"rel":7798},"https://github.com/stefanprodan/podinfo",[23],"Here is a useful implementation",[41,7801,7803],{"className":549,"code":7802,"language":551,"meta":14,"style":14},"kubectl apply -k github.com/stefanprodan/podinfo/kustomize\n\nservice/podinfo created\ndeployment.apps/podinfo created\nhorizontalpodautoscaler.autoscaling/podinfo created\n\n",[48,7804,7805,7817,7821,7829,7836],{"__ignoreMap":14},[501,7806,7807,7809,7811,7814],{"class":503,"line":504},[501,7808,1711],{"class":558},[501,7810,7557],{"class":562},[501,7812,7813],{"class":566}," -k",[501,7815,7816],{"class":562}," github.com/stefanprodan/podinfo/kustomize\n",[501,7818,7819],{"class":503,"line":510},[501,7820,1728],{"emptyLinePlaceholder":757},[501,7822,7823,7826],{"class":503,"line":516},[501,7824,7825],{"class":558},"service/podinfo",[501,7827,7828],{"class":562}," created\n",[501,7830,7831,7834],{"class":503,"line":1385},[501,7832,7833],{"class":558},"deployment.apps/podinfo",[501,7835,7828],{"class":562},[501,7837,7838,7841],{"class":503,"line":1394},[501,7839,7840],{"class":558},"horizontalpodautoscaler.autoscaling/podinfo",[501,7842,7828],{"class":562},[16,7844,7845],{},"Check the PODs are running",[41,7847,7849],{"className":549,"code":7848,"language":551,"meta":14,"style":14},"kubectl get pod\n\nNAME                       READY   STATUS    RESTARTS   AGE\npodinfo-6c77b54bb8-9vgd2   1/1     Running   0          25m\npodinfo-6c77b54bb8-cnnc8   1/1     Running   0          25m\n\n",[48,7850,7851,7860,7864,7877,7891],{"__ignoreMap":14},[501,7852,7853,7855,7857],{"class":503,"line":504},[501,7854,1711],{"class":558},[501,7856,1714],{"class":562},[501,7858,7859],{"class":562}," pod\n",[501,7861,7862],{"class":503,"line":510},[501,7863,1728],{"emptyLinePlaceholder":757},[501,7865,7866,7868,7871,7873,7875],{"class":503,"line":516},[501,7867,1733],{"class":558},[501,7869,7870],{"class":562},"                       READY",[501,7872,1739],{"class":562},[501,7874,1742],{"class":562},[501,7876,1745],{"class":562},[501,7878,7879,7882,7884,7886,7888],{"class":503,"line":1385},[501,7880,7881],{"class":558},"podinfo-6c77b54bb8-9vgd2",[501,7883,1770],{"class":562},[501,7885,1756],{"class":562},[501,7887,1759],{"class":1576},[501,7889,7890],{"class":562},"          25m\n",[501,7892,7893,7896,7898,7900,7902],{"class":503,"line":1394},[501,7894,7895],{"class":558},"podinfo-6c77b54bb8-cnnc8",[501,7897,1770],{"class":562},[501,7899,1756],{"class":562},[501,7901,1759],{"class":1576},[501,7903,7890],{"class":562},[16,7905,7906],{},"Remove the podinfo resources",[41,7908,7910],{"className":549,"code":7909,"language":551,"meta":14,"style":14},"kubectl delete -k github.com/stefanprodan/podinfo/kustomize\n\nservice \"podinfo\" deleted\ndeployment.apps \"podinfo\" deleted\nhorizontalpodautoscaler.autoscaling \"podinfo\" deleted\n\nkubectl get pod                                            \nNo resources found in default namespace.\n",[48,7911,7912,7923,7927,7942,7955,7968,7972,7983],{"__ignoreMap":14},[501,7913,7914,7916,7919,7921],{"class":503,"line":504},[501,7915,1711],{"class":558},[501,7917,7918],{"class":562}," delete",[501,7920,7813],{"class":566},[501,7922,7816],{"class":562},[501,7924,7925],{"class":503,"line":510},[501,7926,1728],{"emptyLinePlaceholder":757},[501,7928,7929,7932,7934,7937,7939],{"class":503,"line":516},[501,7930,7931],{"class":558},"service",[501,7933,1984],{"class":1983},[501,7935,7936],{"class":562},"podinfo",[501,7938,1990],{"class":1983},[501,7940,7941],{"class":562}," deleted\n",[501,7943,7944,7947,7949,7951,7953],{"class":503,"line":1385},[501,7945,7946],{"class":558},"deployment.apps",[501,7948,1984],{"class":1983},[501,7950,7936],{"class":562},[501,7952,1990],{"class":1983},[501,7954,7941],{"class":562},[501,7956,7957,7960,7962,7964,7966],{"class":503,"line":1394},[501,7958,7959],{"class":558},"horizontalpodautoscaler.autoscaling",[501,7961,1984],{"class":1983},[501,7963,7936],{"class":562},[501,7965,1990],{"class":1983},[501,7967,7941],{"class":562},[501,7969,7970],{"class":503,"line":1403},[501,7971,1728],{"emptyLinePlaceholder":757},[501,7973,7974,7976,7978,7980],{"class":503,"line":1415},[501,7975,1711],{"class":558},[501,7977,1714],{"class":562},[501,7979,1717],{"class":562},[501,7981,7982],{"class":1346},"                                            \n",[501,7984,7985,7988,7991,7993,7995,7998],{"class":503,"line":1423},[501,7986,7987],{"class":558},"No",[501,7989,7990],{"class":562}," resources",[501,7992,2581],{"class":562},[501,7994,3296],{"class":562},[501,7996,7997],{"class":562}," default",[501,7999,8000],{"class":562}," namespace.\n",[29,8002,8004],{"id":8003},"cleanup-resource","Cleanup Resource",[41,8006,8008],{"className":549,"code":8007,"language":551,"meta":14,"style":14},"cd infra/terraform/azure\nterraform -chdir='aks' destroy -var-file=../environment/dev/.tfvars\n",[48,8009,8010,8016],{"__ignoreMap":14},[501,8011,8012,8014],{"class":503,"line":504},[501,8013,894],{"class":893},[501,8015,7501],{"class":562},[501,8017,8018,8020,8022,8024,8026,8028,8031],{"class":503,"line":510},[501,8019,7438],{"class":558},[501,8021,7508],{"class":566},[501,8023,2501],{"class":1983},[501,8025,7513],{"class":562},[501,8027,2501],{"class":1983},[501,8029,8030],{"class":562}," destroy",[501,8032,7542],{"class":566},[16,8034,8035],{},"Also remember to delete BlobStorage or any other backend that you have used for the Terraform state and any other resource that you have created manualy.",[725,8037,8038],{},"html pre.shiki code .sCWj5, html code.shiki .sCWj5{--shiki-default:#88C0D0;--shiki-dark:#79B8FF;--shiki-sepia:#66D9EF}html pre.shiki code .siq7d, html code.shiki .siq7d{--shiki-default:#A3BE8C;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html pre.shiki code .sNHwn, html code.shiki .sNHwn{--shiki-default:#88C0D0;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .sqTyp, html code.shiki .sqTyp{--shiki-default:#A3BE8C;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .sQE_P, html code.shiki .sQE_P{--shiki-default:#ECEFF4;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .sUaCP, html code.shiki .sUaCP{--shiki-default:#ECEFF4;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sw3Zv, html code.shiki .sw3Zv{--shiki-default:#D8DEE9FF;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sX_qU, html code.shiki .sX_qU{--shiki-default:#B48EAD;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .s4BcI, html code.shiki .s4BcI{--shiki-default:#81A1C1;--shiki-dark:#F97583;--shiki-sepia:#F92672}",{"title":14,"searchDepth":510,"depth":510,"links":8040},[8041,8042,8043,8044,8045],{"id":1246,"depth":510,"text":1247},{"id":7438,"depth":510,"text":1223},{"id":7562,"depth":510,"text":7563},{"id":4328,"depth":510,"text":4329},{"id":8003,"depth":510,"text":8004},"./infra.png","2023-09-08T08:00:00.000Z","https://github.com/devozs/blog-deployment/tree/main/infra/terraform/azure","IaC, Infra, Azure, AKS, Terraform",{"published":757},"/blog/2023/09/08/infrastructure-azure-terraform",{"title":7411,"description":7416},"infrastructure-azure-terraform","blog/2023/09/08/Infrastructure-azure-terraform",[1219,1220,8056,8057,1223],"Azure","AKS","vJX4TS3MBcjWpEvB4Y0RozC5VYfxqzZXGDBQ_R4BVIY"]