1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- local params = import 'params.libsonnet';
- [
- {
- "apiVersion": "v1",
- "kind": "Service",
- "metadata": {
- "name": params.name
- },
- "spec": {
- "ports": [
- {
- "port": params.servicePort,
- "targetPort": params.containerPort
- }
- ],
- "selector": {
- "app": params.name
- },
- "type": params.type
- }
- },
- {
- "apiVersion": "apps/v1",
- "kind": "Deployment",
- "metadata": {
- "name": params.name
- },
- "spec": {
- "replicas": params.replicas,
- "revisionHistoryLimit": 3,
- "selector": {
- "matchLabels": {
- "app": params.name
- },
- },
- "template": {
- "metadata": {
- "labels": {
- "app": params.name
- }
- },
- "spec": {
- "containers": [
- {
- "image": params.image,
- "name": params.name,
- "ports": [
- {
- "containerPort": params.containerPort
- }
- ]
- }
- ]
- }
- }
- }
- }
- ]
|