Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a EDP User, I want to have capability to define values.yaml file per cd stage (environment) #32

Closed
MykolaMarusenko opened this issue Sep 4, 2023 · 0 comments
Assignees
Labels
feature New functionality

Comments

@MykolaMarusenko
Copy link
Contributor

MykolaMarusenko commented Sep 4, 2023

Acceptance Criteria:

  • EDP user can manage values as gitops approach;
  • use EDP Portal to modify and save custom values.yaml;
  • user can use approach to deploy envs with custom values;

language: helm
framework: gitops
build_tool: helm

Example Argo CD application with custom values:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: mm-fastapi-custom
spec:
  destination:
    name: in-cluster
    namespace: demo-deploy-dev
  project: demo
  sources:
  - repoURL: ssh://argocd@gerrit.demo:30222/edp-gitops
    targetRevision: main
    ref: values
  - helm:
      valueFiles:
        - $values/deploy/dev/mm-fastapi-values.yaml
      parameters:
        - name: image.tag
          value: 0.1.0-SNAPSHOT.2
        - name: image.repository
          value: registry.example.com/demo/mm-fastapi
      releaseName: mm-fastapi
    path: deploy-templates
    repoURL: ssh://argocd@gerrit.demo:30222/mm-fastapi
    targetRevision: build/0.1.0-SNAPSHOT.2
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

Template:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: mm-fastapi-custom
spec:
  destination:
    name: in-cluster
    namespace: demo-deploy-dev
  project: demo
  sources:
  - repoURL: ssh://argocd@gerrit.demo:30222/edp-gitops
    targetRevision: main
    ref: values
  - helm:
      valueFiles:
        - $values/<cdpipelinename>/<cdstagename>/<application-name>-values.yaml
      parameters:
        - name: image.tag
          value: 0.1.0-SNAPSHOT.2
        - name: image.repository
          value: registry.example.com/demo/mm-fastapi
      releaseName: mm-fastapi
    path: deploy-templates
    repoURL: ssh://argocd@gerrit.demo:30222/mm-fastapi
    targetRevision: build/0.1.0-SNAPSHOT.2
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true

Pattern to provision edp-gitops repository:

apiVersion: v2.edp.epam.com/v1
kind: Codebase
metadata:
  labels:
    app.edp.epam.com/codebaseType: system
  name: edp-gitops
spec:
  buildTool: helm
  ciTool: tekton
  defaultBranch: main
  deploymentScript: helm-chart
  description: Custom values for deploy applications
  emptyProject: false
  framework: gitops
  gitServer: gerrit # can be depend on gitserver
  gitUrlPath: <path_to_repo>/edp-gitops
  jenkinsSlave: null
  jiraIssueMetadataPayload: null
  jobProvisioning: null
  lang: helm
  strategy: create
  ticketNamePattern: null
  type: system
  versioning:
    startFrom: 0.1.0-SNAPSHOT
    type: edp

EDP Portal steps:

  • Add CD pipeline (GitOps) in configuration page;
  • in CD pipeline (GitOps) configuration user can provide only path to repo;
  • user cannot modify path after apply;
  • after apply describe short information about codebase provisioning (repo path);
  • Add custom values checkbox in cd stage;
  • If user set checkbox with custom values to true - EDP portal create kind: Application with additional values path;
  • when user provide path to codebase with custom values - user can create CD pipeline and new codebase must contain type app.edp.epam.com/codebaseType: system and name edp-gitops;
  • hide deletion button if codebase contain app.edp.epam.com/codebaseType: system;
  • if user do not configure CD pipeline (GitOps) in Configuration section - use cannot create CD pipeline in Environment page;
  • add lock icon (System Repository) if have app.edp.epam.com/codebaseType: system label;
  • Git Repo relative path available only for github, gitlab integration;
  • add hardcoded field Repository Name;

Repository schema:
cdpipelinename/сdstagename/application-name-values.yaml

image
image
image

@MykolaMarusenko MykolaMarusenko converted this from a draft issue Sep 4, 2023
@MykolaMarusenko MykolaMarusenko added the feature New functionality label Sep 4, 2023
@callmevladik callmevladik moved this from Todo to In Progress in KubeRocketCI (EPAM Delivery Platform) Sep 5, 2023
epmd-edp pushed a commit that referenced this issue Sep 6, 2023
…gitops codebase custom values (#32)

Jira: EPMDEDP-12496
Resolves: #32
Change-Id: Ib1cf78c8c1ba149eede379a6ae7bdbecc7dca6da
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
Development

No branches or pull requests

2 participants