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

POD_NAME + NAMESPACE_NAME in Message #81

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Conversation

mathieu-benoit
Copy link
Owner

No description provided.

@github-actions
Copy link

Deployment successfully completed for PR-81! 🎉

View in Humanitec

Deployment ID: 366c8a2e3549a0fda303bf12de607eba6a6af662

Domains:

my-sample-app: greenholtmitchellturnerleuschkepagacabbott.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:8e13c57f183c9c06a8fb7336ceedaee75481435c65b97db793d673d6527db1fd"
        },
        {
          "from": "",
          "op": "add",
          "path": "/spec/containers/my-sample-app/variables/POD_NAME",
          "value": "${pod.metadata.name}"
        },
        {
          "from": "",
          "op": "add",
          "path": "/spec/containers/my-sample-app/variables/NAMESPACE_NAME",
          "value": "${pod.metadata.namespace}"
        }
      ]
    }
  },
  "shared": null
}
Score Output

Score Output:

{
  "id": "366c8a2e3549a0fda303bf12de607eba6a6af662",
  "metadata": {
    "env_id": "pr-81",
    "name": "podName + namespaceName",
    "url": "https://app.humanitec.io/orgs/my-trial/apps/my-sample-app/envs/pr-81/draft/366c8a2e3549a0fda303bf12de607eba6a6af662",
    "created_by": "s-9d271151-e949-4548-81ed-e7c652fecbb8",
    "created_at": "2023-10-11T23:37:27.019646492Z",
    "last_modified_at": "2023-10-11T23:37:27.019646492Z"
  },
  "modules": {
    "add": {
      "my-sample-app": {
        "externals": {
          "dns": {
            "type": "dns"
          },
          "route": {
            "params": {
              "host": "${externals.dns.host}",
              "path": "/",
              "port": 8080
            },
            "type": "route"
          }
        },
        "profile": "humanitec/default-module",
        "spec": {
          "annotations": {
            "humanitec.io/managed-by": "score-humanitec"
          },
          "containers": {
            "my-sample-app": {
              "id": "my-sample-app",
              "image": "us-east4-docker.pkg.dev/mathieu-benoit-gcp/containers/my-sample-app@sha256:8e13c57f183c9c06a8fb7336ceedaee75481435c65b97db793d673d6527db1fd",
              "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 06c9189 into main Oct 11, 2023
2 checks passed
@mathieu-benoit mathieu-benoit deleted the pod-namespace-in-message branch October 11, 2023 23:42
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