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

Fix subPath for appsettings.json + add more examples with shared values #101

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

mathieu-benoit
Copy link
Owner

No description provided.

Copy link

Deployment successfully completed for PR-101! 🎉

View in Humanitec

Deployment ID: a94aac6c7b4885430fdc14f2b42fc17d860b039e

Domains:

my-sample-app: gradymooregutkowski.newapp.io

Deployment diff

Deployment diff:

{
  "modules": {
    "add": null,
    "remove": [],
    "update": {
      "my-sample-app": [
        {
          "from": "",
          "op": "replace",
          "path": "/spec/containers/my-sample-app/image",
          "value": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:650fa313b69f37f13c7cb943617d3c535c7dee5d74a25bd0756fbc9ff729685b"
        },
        {
          "from": "",
          "op": "replace",
          "path": "/spec/containers/my-sample-app/variables/MESSAGE",
          "value": "Hello, Test!"
        },
        {
          "from": "",
          "op": "replace",
          "path": "/spec/annotations/humanitec.io~1workload-source",
          "value": "https://github.com/mathieu-benoit/sail-sharp/blob/mathieu-benoit-patch-1/score/score.yaml"
        }
      ]
    }
  },
  "shared": null
}
Score Output

Score Output:

{
  "id": "a94aac6c7b4885430fdc14f2b42fc17d860b039e",
  "metadata": {
    "env_id": "pr-101",
    "name": "Update score.yaml",
    "url": "https://app.humanitec.io/orgs/mabenoit/apps/my-sample-app/envs/pr-101/draft/a94aac6c7b4885430fdc14f2b42fc17d860b039e",
    "created_by": "s-bfd1178a-106a-4135-b6e9-95b5a9c92b59",
    "created_at": "2024-02-21T02:24:19.681679792Z",
    "last_modified_at": "2024-02-21T02:24:19.681679792Z"
  },
  "modules": {
    "add": {
      "my-sample-app": {
        "externals": {
          "dns": {
            "class": "default",
            "type": "dns"
          },
          "route": {
            "class": "default",
            "params": {
              "host": "${externals.dns.host}",
              "path": "/",
              "port": 8080
            },
            "type": "route"
          }
        },
        "profile": "humanitec/default-module",
        "spec": {
          "annotations": {
            "humanitec.io/managed-by": "score-humanitec",
            "humanitec.io/workload-source": "https://github.com/mathieu-benoit/sail-sharp/blob/mathieu-benoit-patch-1/score/score.yaml"
          },
          "containers": {
            "my-sample-app": {
              "id": "my-sample-app",
              "image": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:650fa313b69f37f13c7cb943617d3c535c7dee5d74a25bd0756fbc9ff729685b",
              "resources": {
                "limits": {
                  "cpu": "250m",
                  "memory": "256Mi"
                },
                "requests": {
                  "cpu": "25m",
                  "memory": "64Mi"
                }
              },
              "variables": {
                "MESSAGE": "Hello, Test!",
                "NAMESPACE_NAME": "${pod.metadata.namespace}",
                "POD_NAME": "${pod.metadata.name}"
              }
            }
          },
          "service": {
            "ports": {
              "tcp": {
                "container_port": 8080,
                "protocol": "TCP",
                "service_port": 8080
              }
            }
          },
          "terminationGracePeriodSeconds": 60
        }
      }
    }
  }
}

Copy link

Deployment successfully completed for PR-101! 🎉

View in Humanitec

Deployment ID: 6d67d7dfa3636edce3baf258d9bb50c13e9b67d8

Domains:

my-sample-app: gradymooregutkowski.newapp.io

Deployment diff

Deployment diff:

{
  "modules": {
    "add": null,
    "remove": [],
    "update": {
      "my-sample-app": [
        {
          "from": "",
          "op": "replace",
          "path": "/spec/containers/my-sample-app/image",
          "value": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:9fcf1d497b779370e5d29a74daad349d39dc1ed2e418e01cd9f02ed3f698b67d"
        },
        {
          "from": "",
          "op": "replace",
          "path": "/spec/containers/my-sample-app/variables/MESSAGE",
          "value": "Hello, Test!"
        },
        {
          "from": "",
          "op": "add",
          "path": "/spec/annotations/humanitec.io~1workload-source",
          "value": "https://github.com/mathieu-benoit/sail-sharp/blob/mathieu-benoit-patch-1/score/score.yaml"
        },
        {
          "from": "",
          "op": "remove",
          "path": "/externals/blob",
          "value": null
        }
      ]
    }
  },
  "shared": null
}
Score Output

Score Output:

{
  "id": "6d67d7dfa3636edce3baf258d9bb50c13e9b67d8",
  "metadata": {
    "env_id": "pr-101",
    "name": "appsettings.json",
    "url": "https://app.humanitec.io/orgs/mabenoit/apps/my-sample-app/envs/pr-101/draft/6d67d7dfa3636edce3baf258d9bb50c13e9b67d8",
    "created_by": "s-bfd1178a-106a-4135-b6e9-95b5a9c92b59",
    "created_at": "2024-02-24T00:51:16.575539604Z",
    "last_modified_at": "2024-02-24T00:51:16.575539604Z"
  },
  "modules": {
    "add": {
      "my-sample-app": {
        "externals": {
          "dns": {
            "class": "default",
            "type": "dns"
          },
          "route": {
            "class": "default",
            "params": {
              "host": "${externals.dns.host}",
              "path": "/",
              "port": 8080
            },
            "type": "route"
          }
        },
        "profile": "humanitec/default-module",
        "spec": {
          "annotations": {
            "humanitec.io/managed-by": "score-humanitec",
            "humanitec.io/workload-source": "https://github.com/mathieu-benoit/sail-sharp/blob/mathieu-benoit-patch-1/score/score.yaml"
          },
          "containers": {
            "my-sample-app": {
              "id": "my-sample-app",
              "image": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:9fcf1d497b779370e5d29a74daad349d39dc1ed2e418e01cd9f02ed3f698b67d",
              "resources": {
                "limits": {
                  "cpu": "250m",
                  "memory": "256Mi"
                },
                "requests": {
                  "cpu": "25m",
                  "memory": "64Mi"
                }
              },
              "variables": {
                "MESSAGE": "Hello, Test!",
                "NAMESPACE_NAME": "${pod.metadata.namespace}",
                "POD_NAME": "${pod.metadata.name}"
              }
            }
          },
          "service": {
            "ports": {
              "tcp": {
                "container_port": 8080,
                "protocol": "TCP",
                "service_port": 8080
              }
            }
          },
          "terminationGracePeriodSeconds": 60
        }
      }
    }
  }
}

@mathieu-benoit mathieu-benoit changed the title Update score.yaml Fix subPath for appsettings.json + add more examples with shared values Feb 28, 2024
Copy link

Deployment successfully completed for PR-101! 🎉

View in Humanitec

Deployment ID: 3ef1de542ba18049434c65f255d20b86db7c49c3

Domains:

my-sample-app: gradymooregutkowski.newapp.io

Deployment diff

Deployment diff:

{
  "modules": {
    "add": null,
    "remove": [],
    "update": {
      "my-sample-app": [
        {
          "from": "",
          "op": "replace",
          "path": "/spec/containers/my-sample-app/image",
          "value": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:16571887796348061e5392c1a499dbf4ea749139f68b93b7c034c762e5c5d648"
        },
        {
          "from": "",
          "op": "replace",
          "path": "/spec/containers/my-sample-app/variables/MESSAGE",
          "value": "Hello, Test!"
        },
        {
          "from": "",
          "op": "add",
          "path": "/spec/annotations/humanitec.io~1workload-source",
          "value": "https://github.com/mathieu-benoit/sail-sharp/blob/mathieu-benoit-patch-1/score/score.yaml"
        },
        {
          "from": "",
          "op": "remove",
          "path": "/externals/blob",
          "value": null
        }
      ]
    }
  },
  "shared": null
}
Score Output

Score Output:

{
  "id": "3ef1de542ba18049434c65f255d20b86db7c49c3",
  "metadata": {
    "env_id": "pr-101",
    "name": "score with shared values example",
    "url": "https://app.humanitec.io/orgs/mabenoit/apps/my-sample-app/envs/pr-101/draft/3ef1de542ba18049434c65f255d20b86db7c49c3",
    "created_by": "s-bfd1178a-106a-4135-b6e9-95b5a9c92b59",
    "created_at": "2024-02-28T17:28:09.171998565Z",
    "last_modified_at": "2024-02-28T17:28:09.171998565Z"
  },
  "modules": {
    "add": {
      "my-sample-app": {
        "externals": {
          "dns": {
            "class": "default",
            "type": "dns"
          },
          "route": {
            "class": "default",
            "params": {
              "host": "${externals.dns.host}",
              "path": "/",
              "port": 8080
            },
            "type": "route"
          }
        },
        "profile": "humanitec/default-module",
        "spec": {
          "annotations": {
            "humanitec.io/managed-by": "score-humanitec",
            "humanitec.io/workload-source": "https://github.com/mathieu-benoit/sail-sharp/blob/mathieu-benoit-patch-1/score/score.yaml"
          },
          "containers": {
            "my-sample-app": {
              "id": "my-sample-app",
              "image": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:16571887796348061e5392c1a499dbf4ea749139f68b93b7c034c762e5c5d648",
              "resources": {
                "limits": {
                  "cpu": "250m",
                  "memory": "256Mi"
                },
                "requests": {
                  "cpu": "25m",
                  "memory": "64Mi"
                }
              },
              "variables": {
                "MESSAGE": "Hello, Test!",
                "NAMESPACE_NAME": "${pod.metadata.namespace}",
                "POD_NAME": "${pod.metadata.name}"
              }
            }
          },
          "service": {
            "ports": {
              "tcp": {
                "container_port": 8080,
                "protocol": "TCP",
                "service_port": 8080
              }
            }
          },
          "terminationGracePeriodSeconds": 60
        }
      }
    }
  }
}

Copy link

Deployment successfully completed for PR-101! 🎉

View in Humanitec

Deployment ID: 97911fd90cec2e825cf6071eb20b3dc52c9af1a1

Domains:

my-sample-app: gradymooregutkowski.newapp.io

Deployment diff

Deployment diff:

{
  "modules": {
    "add": null,
    "remove": [],
    "update": {
      "my-sample-app": [
        {
          "from": "",
          "op": "remove",
          "path": "/externals/blob",
          "value": null
        },
        {
          "from": "",
          "op": "replace",
          "path": "/spec/containers/my-sample-app/image",
          "value": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:9d3ca3f2039d64b7c58f8b8caaea46a3191e8420591d4bce1b4d19b751f9482a"
        },
        {
          "from": "",
          "op": "add",
          "path": "/spec/annotations/humanitec.io~1workload-source",
          "value": "https://github.com/mathieu-benoit/sail-sharp/blob/mathieu-benoit-patch-1/score/score.yaml"
        }
      ]
    }
  },
  "shared": null
}
Score Output

Score Output:

{
  "id": "97911fd90cec2e825cf6071eb20b3dc52c9af1a1",
  "metadata": {
    "env_id": "pr-101",
    "name": "score with shared values example",
    "url": "https://app.humanitec.io/orgs/mabenoit/apps/my-sample-app/envs/pr-101/draft/97911fd90cec2e825cf6071eb20b3dc52c9af1a1",
    "created_by": "s-bfd1178a-106a-4135-b6e9-95b5a9c92b59",
    "created_at": "2024-02-28T17:30:42.173800749Z",
    "last_modified_at": "2024-02-28T17:30:42.173800749Z"
  },
  "modules": {
    "add": {
      "my-sample-app": {
        "externals": {
          "dns": {
            "class": "default",
            "type": "dns"
          },
          "route": {
            "class": "default",
            "params": {
              "host": "${externals.dns.host}",
              "path": "/",
              "port": 8080
            },
            "type": "route"
          }
        },
        "profile": "humanitec/default-module",
        "spec": {
          "annotations": {
            "humanitec.io/managed-by": "score-humanitec",
            "humanitec.io/workload-source": "https://github.com/mathieu-benoit/sail-sharp/blob/mathieu-benoit-patch-1/score/score.yaml"
          },
          "containers": {
            "my-sample-app": {
              "id": "my-sample-app",
              "image": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:9d3ca3f2039d64b7c58f8b8caaea46a3191e8420591d4bce1b4d19b751f9482a",
              "resources": {
                "limits": {
                  "cpu": "250m",
                  "memory": "256Mi"
                },
                "requests": {
                  "cpu": "25m",
                  "memory": "64Mi"
                }
              },
              "variables": {
                "MESSAGE": "Hello, World!",
                "NAMESPACE_NAME": "${pod.metadata.namespace}",
                "POD_NAME": "${pod.metadata.name}"
              }
            }
          },
          "service": {
            "ports": {
              "tcp": {
                "container_port": 8080,
                "protocol": "TCP",
                "service_port": 8080
              }
            }
          },
          "terminationGracePeriodSeconds": 60
        }
      }
    }
  }
}

@mathieu-benoit mathieu-benoit merged commit 59ed34c into main Feb 28, 2024
2 checks passed
@mathieu-benoit mathieu-benoit deleted the mathieu-benoit-patch-1 branch February 28, 2024 17:31
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 this pull request may close these issues.

1 participant