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

Add support for YAML anchors #98

Open
moklidia opened this issue Apr 27, 2022 · 2 comments · Fixed by #123
Open

Add support for YAML anchors #98

moklidia opened this issue Apr 27, 2022 · 2 comments · Fixed by #123
Assignees

Comments

@moklidia
Copy link
Collaborator

We need to be able to parse YAML anchors for a more seamless user experience

https://www.cloudsavvyit.com/10765/how-to-simplify-docker-compose-files-with-yaml-anchors-and-extensions/#:~:text=YAML%20anchors%20are%20a%20feature,the%20value%20following%20the%20anchor.

zipofar pushed a commit that referenced this issue May 20, 2022
zipofar pushed a commit that referenced this issue May 23, 2022
zipofar pushed a commit that referenced this issue May 23, 2022
@zipofar
Copy link
Contributor

zipofar commented May 23, 2022

MR: #123
Also was changed uffizzi_cli - MR UffizziCloud/uffizzi_cli#108

So if testing with help uffizzi_cli we should use that changes

@NealArw
Copy link
Contributor

NealArw commented May 24, 2022

TESTED - OK

File: Click to expand
definitions:
    environment: &env-var
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres

services:
  redis:
    image: redis:latest
    environment: *env-var

  postgres:
    image: postgres:9.6
    secrets:
      - user
      - password
      - neal
    environment: *env-var

  nginx:
    image: nginx:latest
    configs:
      - source: my_config_2
        target: /etc/nginx/conf.d/default.conf

  worker:
    image: uffizzi/example-voting-app-worker:master
    deploy:
      resources:
        limits:
          memory: 250M

  vote:
    image: uffizzi/example-voting-app-vote:master

  result:
    image: uffizzi/example-voting-app-result:master

x-uffizzi-ingress:
  service: nginx
  port: 8080
  
x-uffizzi-continuous_preview:
  deploy_preview_when_pull_request_is_opened: true
  delete_preview_when_pull_request_is_closed: true
  delete_preview_after: 2h
  share_to_github: true
  deploy_preview_when_image_tag_is_created: true
  delete_preview_when_image_tag_is_updated: true
  
configs:
  my_config_2:
    file: ./vote2.conf

secrets:
  user:
    external: true               # indicates value is external to this repository
    name: "POSTGRES_USER"  
  password:
    external: true               # indicates value is external to this repository
    name: "POSTGRES_PASSWORD"
  neal:
    external: true               # indicates value is external to this repository
    name: "TEST_NEAL"  
Result: Click to expand
containers: [{
    : id => 29,
    : kind => "user",
    : image => "library/nginx",
    : tag => "latest",
    : variables => [],
    : secret_variables => nil,
    : created_at => "2022-05-24T14:12:38.505Z",
    : updated_at => "2022-05-24T14:12:42.378Z",
    : memory_limit => 125,
    : memory_request => 125,
    : entrypoint => nil,
    : command => nil,
    : port => 8080,
    : public => true,
    : repo_id => 29,
    : continuously_deploy => "enabled",
    : receive_incoming_requests => true,
    : healthcheck => {}
}, {
    : id => 27,
    : kind => "user",
    : image => "library/redis",
    : tag => "latest",
    : variables => [{
        : name => "POSTGRES_USER",
        : value => "postgres"
    }, {
        : name => "POSTGRES_PASSWORD",
        : value => "postgres"
    }],
    : secret_variables => nil,
    : created_at => "2022-05-24T14:12:38.485Z",
    : updated_at => "2022-05-24T14:12:42.263Z",
    : memory_limit => 125,
    : memory_request => 125,
    : entrypoint => nil,
    : command => nil,
    : port => nil,
    : public => false,
    : repo_id => 27,
    : continuously_deploy => "enabled",
    : receive_incoming_requests => false,
    : healthcheck => {}
}, {
    : id => 28,
    : kind => "user",
    : image => "library/postgres",
    : tag => "9.6",
    : variables => [{
        : name => "POSTGRES_USER",
        : value => "postgres"
    }, {
        : name => "POSTGRES_PASSWORD",
        : value => "postgres"
    }],
    : secret_variables => [{
        : name => "POSTGRES_USER",
        : value => "******"
    }, {
        : name => "POSTGRES_PASSWORD",
        : value => "******"
    }, {
        : name => "TEST_NEAL",
        : value => "******"
    }],
    : created_at => "2022-05-24T14:12:38.493Z",
    : updated_at => "2022-05-24T14:12:42.319Z",
    : memory_limit => 125,
    : memory_request => 125,
    : entrypoint => nil,
    : command => nil,
    : port => nil,
    : public => false,
    : repo_id => 28,
    : continuously_deploy => "enabled",
    : receive_incoming_requests => false,
    : healthcheck => {}
}, {
    : id => 30,
    : kind => "user",
    : image => "uffizzi/example-voting-app-worker",
    : tag => "master",
    : variables => [],
    : secret_variables => nil,
    : created_at => "2022-05-24T14:12:38.516Z",
    : updated_at => "2022-05-24T14:12:42.405Z",
    : memory_limit => 250,
    : memory_request => 250,
    : entrypoint => nil,
    : command => nil,
    : port => nil,
    : public => false,
    : repo_id => 30,
    : continuously_deploy => "enabled",
    : receive_incoming_requests => false,
    : healthcheck => {}
}, {
    : id => 31,
    : kind => "user",
    : image => "uffizzi/example-voting-app-vote",
    : tag => "master",
    : variables => [],
    : secret_variables => nil,
    : created_at => "2022-05-24T14:12:38.525Z",
    : updated_at => "2022-05-24T14:12:42.439Z",
    : memory_limit => 125,
    : memory_request => 125,
    : entrypoint => nil,
    : command => nil,
    : port => nil,
    : public => false,
    : repo_id => 31,
    : continuously_deploy => "enabled",
    : receive_incoming_requests => false,
    : healthcheck => {}
}, {
    : id => 32,
    : kind => "user",
    : image => "uffizzi/example-voting-app-result",
    : tag => "master",
    : variables => [],
    : secret_variables => nil,
    : created_at => "2022-05-24T14:12:38.533Z",
    : updated_at => "2022-05-24T14:12:42.485Z",
    : memory_limit => 125,
    : memory_request => 125,
    : entrypoint => nil,
    : command => nil,
    : port => nil,
    : public => false,
    : repo_id => 32,
    : continuously_deploy => "enabled",
    : receive_incoming_requests => false,
    : healthcheck => {}
}]

@7R41N33 7R41N33 linked a pull request May 27, 2022 that will close this issue
the38th pushed a commit that referenced this issue May 30, 2022
the38th pushed a commit that referenced this issue May 30, 2022
the38th added a commit that referenced this issue May 30, 2022
…yaml-anchors

[#98] Add support for YAML anchors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants