{"id":19792055,"url":"https://github.com/making/sample-convention-server","last_synced_at":"2025-05-01T02:30:25.336Z","repository":{"id":42773520,"uuid":"510664986","full_name":"making/sample-convention-server","owner":"making","description":"Sample Convention Server for Tanzu Application Platform","archived":false,"fork":false,"pushed_at":"2023-02-09T11:00:32.000Z","size":124,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T07:37:34.410Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/making.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-05T09:14:33.000Z","updated_at":"2023-09-27T13:24:48.000Z","dependencies_parsed_at":"2022-09-19T06:02:19.048Z","dependency_job_id":null,"html_url":"https://github.com/making/sample-convention-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/making%2Fsample-convention-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/making%2Fsample-convention-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/making%2Fsample-convention-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/making%2Fsample-convention-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/making","download_url":"https://codeload.github.com/making/sample-convention-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251812227,"owners_count":21647866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T07:05:48.356Z","updated_at":"2025-05-01T02:30:25.072Z","avatar_url":"https://github.com/making.png","language":"Java","readme":"# Sample convention server for Tanzu Application Platform\n\nA Java implementation of https://github.com/vmware-tanzu/cartographer-conventions/blob/main/samples/convention-server\n\n### How to deploy the convention server\n\n```\nkbld -f k8s/server-for-tap1.1.yaml | kapp deploy -a sample-convention -f - -c -y\n```\n\n### How to build the image of the convention server\n\nThe image of sample-convention-server is managed by Tanzu Build Service, which was created\nas follows:\n\n```\nkp image save sample-convention-server \\\n  --tag ghcr.io/making/sample-convention-server \\\n  --git https://github.com/making/sample-convention-server \\\n  --git-revision main \\\n  --env BP_JVM_VERSION=17 \\\n  --wait\n```\n\nYou should be also able to build your own image using Maven plugin as follows:\n\n```\nIMAGE_NAME=...\n./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=${IMAGE_NAME}\ndocker push ${IMAGE_NAME}\n```\n\n### Trying out\n\n```\ncurl -sL https://github.com/vmware-tanzu/cartographer-conventions/raw/main/samples/spring-convention-server/workload.yaml | sed 's/carto.run/apps.tanzu.vmware.com/g' | kubectl apply -f-\n```\n\n```\n$ kubectl get podintent spring-sample -oyaml\napiVersion: conventions.apps.tanzu.vmware.com/v1alpha1\nkind: PodIntent\nmetadata:\n  annotations:\n    kubectl.kubernetes.io/last-applied-configuration: |\n      {\"apiVersion\":\"conventions.apps.tanzu.vmware.com/v1alpha1\",\"kind\":\"PodIntent\",\"metadata\":{\"annotations\":{},\"name\":\"spring-sample\",\"namespace\":\"default\"},\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"image\":\"scothis/petclinic:sbom-20211210@sha256:8b517f21f283229e855e316e2753396239884eb9c4009ab6c797bdf2a041140f\",\"name\":\"workload\"}]}}}}\n  creationTimestamp: \"2022-07-05T16:24:37Z\"\n  generation: 1\n  name: spring-sample\n  namespace: default\n  resourceVersion: \"259630652\"\n  uid: a7629af8-d1a0-48b6-9694-afa60495b8c0\nspec:\n  serviceAccountName: default\n  template:\n    metadata: {}\n    spec:\n      containers:\n      - image: scothis/petclinic:sbom-20211210@sha256:8b517f21f283229e855e316e2753396239884eb9c4009ab6c797bdf2a041140f\n        name: workload\n        resources: {}\nstatus:\n  conditions:\n  - lastTransitionTime: \"2022-07-05T16:26:11Z\"\n    message: \"\"\n    reason: Applied\n    status: \"True\"\n    type: ConventionsApplied\n  - lastTransitionTime: \"2022-07-05T16:26:11Z\"\n    message: \"\"\n    reason: ConventionsApplied\n    status: \"True\"\n    type: Ready\n  observedGeneration: 1\n  template:\n    metadata:\n      annotations:\n        boot.spring.io/actuator: http://:8081/actuator\n        boot.spring.io/version: 2.5.6\n        conventions.apps.tanzu.vmware.com/applied-conventions: |-\n          sample-convention/add-env-var\n          spring-boot-convention/spring-boot\n          spring-boot-convention/spring-boot-graceful-shutdown\n          spring-boot-convention/spring-boot-web\n          spring-boot-convention/spring-boot-actuator\n          spring-boot-convention/service-intent-mysql\n          spring-boot-convention/service-intent-postgres\n          appliveview-sample/app-live-view-connector\n          appliveview-sample/app-live-view-appflavours\n          appliveview-sample/app-live-view-systemproperties\n        services.conventions.apps.tanzu.vmware.com/mysql: mysql-connector-java/8.0.27\n        services.conventions.apps.tanzu.vmware.com/postgres: postgresql/42.2.24\n      labels:\n        conventions.apps.tanzu.vmware.com/framework: spring-boot\n        services.conventions.apps.tanzu.vmware.com/mysql: workload\n        services.conventions.apps.tanzu.vmware.com/postgres: workload\n        tanzu.app.live.view: \"true\"\n        tanzu.app.live.view.application.actuator.port: \"8081\"\n        tanzu.app.live.view.application.flavours: spring-boot\n        tanzu.app.live.view.application.name: petclinic\n    spec:\n      containers:\n      - env:\n        - name: CONVENTION_SERVER # \u003c------------------------------ ⭐️⭐️⭐️⭐️⭐️\n          value: HELLO FROM CONVENTION\n        - name: JAVA_TOOL_OPTIONS\n          value: -Dmanagement.endpoint.health.probes.add-additional-paths=\"true\" -Dmanagement.endpoint.health.show-details=always\n            -Dmanagement.endpoints.web.base-path=\"/actuator\" -Dmanagement.endpoints.web.exposure.include=*\n            -Dmanagement.health.probes.enabled=\"true\" -Dmanagement.server.port=\"8081\"\n            -Dserver.port=\"8080\" -Dserver.shutdown.grace-period=\"24s\"\n        image: index.docker.io/scothis/petclinic@sha256:8b517f21f283229e855e316e2753396239884eb9c4009ab6c797bdf2a041140f\n        name: workload\n        ports:\n        - containerPort: 8080\n          protocol: TCP\n        resources: {}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaking%2Fsample-convention-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaking%2Fsample-convention-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaking%2Fsample-convention-server/lists"}