summaryrefslogtreecommitdiffstats
path: root/kubernetes/dcaegen2/charts/dcae-config-binding-service/templates/service.yaml
blob: 794b896eefeb63dc173c4c943bd8983630e1663c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#============LICENSE_START========================================================
# ================================================================================
# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============LICENSE_END=========================================================

apiVersion: v1
kind: Service
metadata:
  name: {{ include "common.servicename" . }}
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  type: {{ .Values.service.type }}
  ports:
    {{if eq .Values.service.type "NodePort" -}}
    - port: {{ .Values.service.externalPort }}
      nodePort: {{ .Values.global.nodePortPrefixExt| default .Values.nodePortPrefixExt }}{{ .Values.service.nodePort }}
      name: {{ .Values.service.name }}
    {{- else -}}
    - port: {{ .Values.service.externalPort }}
      targetPort: {{ .Values.service.internalPort }}
      name: {{ .Values.service.name }}
    {{- end}}
  selector:
    app: {{ include "common.name" . }}
    release: {{ .Release.Name }}
d { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
{
    "swagger": "2.0",
    "info": {
        "version": "1.0.0",
        "title": "MultiVIM Service rest API"
    },
    "basePath": "/api/multicloud-newton/v0/",
    "tags": [
        {
            "name": "MultiVIM services"
        }
    ],
    "paths": {
        "/{vimid}/{tenantid}/images": {
            "post": {
                "tags": [
                    "vim images"
                ],
                "summary": "create a image",
                "description": "create a image",
                "operationId": "create_vim_image",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vimid",
                        "in": "path",
                        "description": "vim instance id",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "tenantid",
                        "in": "path",
                        "description": "tenant UUID",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "in": "body",
                        "name": "body",
                        "description": "create vim image request param",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/CreateVimImage"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "successful operation",
                        "schema": {
                            "$ref": "#/definitions/VimImageInfo"
                        }
                    },
                    "404": {
                        "description": "the vim id or tenant UUID is wrong"
                    },
                    "500": {
                        "description": "the vim image is not accessable"
                    }
                }
            },
            "get": {
                "tags": [
                    "vim images"
                ],
                "summary": "query vim images list",
                "description": "query vim images list",
                "operationId": "query_vim_images",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vimid",
                        "in": "path",
                        "description": "vim instance id",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "tenantid",
                        "in": "path",
                        "description": "tenant UUID",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "name",
                        "in":  "query",
                        "description": "images name to filter list",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "limit",
                        "in":  "query",
                        "description": "Requests a page size of items",
                        "required": false,
                        "type": "string"
                    },
                    {
                        "name": "marker",
                        "in":  "query",
                        "description": "image ID of the last-seen item",
                        "required": false,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "successful operation",
                        "schema": {
                            "$ref": "#/definitions/VimImagesInfo"
                        }
                    },
                    "404": {
                        "description": "the vim id or tenant UUID is wrong"
                    },
                    "500": {
                        "description": "the vim image is not accessable"
                    }
                }
            }
        },
        "/{vimid}/{tenantid}/images/{imageid}": {
            "delete": {
                "tags": [
                    "vim images"
                 ],
                 "summary": "delete specific vim image",
                "description": "delete specific vim image",
                "operationId": "delete_vim_image",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vimid",
                        "in": "path",
                        "description": "vim instance id",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "tenantid",
                        "in": "path",
                        "description": "tenant UUID",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "imageid",
                        "in": "path",
                        "description": "vim image id",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "204": {
                        "description": "successful operation"
                    },
                    "404": {
                        "description": "the vim id or tenant UUID is wrong"
                    },
                    "500": {
                        "description": "the vim image is not accessable"
                    }
                }
            },
            "get": {
                "tags": [
                    "vim images"
                ],
                "summary": "query specific vim image",
                "description": "query specific vim image",
                "operationId": "query_vim_image",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "vimid",
                        "in": "path",
                        "description": "vim instance id",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "tenantid",
                        "in": "path",
                        "description": "tenant UUID",
                        "required": true,
                        "type": "string"
                    },
                    {
                        "name": "imageid",
                        "in": "path",
                        "description": "vim image id",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "successful operation",
                        "schema": {
                            "$ref": "#/definitions/VimImageInfo"
                        }
                    },
                    "404": {
                        "description": "the vim id or tenant UUID is wrong"
                    },
                    "500": {
                        "description": "the vim image is not accessable"
                    }
                }
            }
        }
    },
    "definitions": {
        "CreateVimImage": {
            "type": "object",
            "required": [
                "imagePath",
                "name",
                "imageType",
                "containerFormat"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "description": "image name"
                },
                "imageType": {
                    "type": "string",
                    "description": "image type: ami, ari, aki, vhd, vhdx, vmdk, raw, qcow2, vdi, iso"
                },
                "imagePath": {
                    "type": "string",
                    "description": "image url to catalog"
                },
                "containerFormat": {
                    "type": "string",
                    "description": "image container format: ami, ari, aki, bare, ovf, ova,  docker"
                },
                "visibility": {
                    "type": "string",
                    "description": "public, private, shared, or community"
                }
            }
        },
        "VimImagesInfo": {
            "type": "object",
            "required": [
                "vimId",
                "tenantId",
                "images"
            ],
            "properties": {
                "vimId": {
                    "type": "string"
                },
                "vimName": {
                    "type": "string"
                },
                "tenantId": {
                    "type": "string",
                    "description": "tenant UUID"
                },
                "images": {
                    "type": "array",
                    "description": "image list information",
                    "items": {
                       "$ref": "#/definitions/VimImageInfo"
                    }
                }
            }
        },
        "VimImageInfo": {
            "type": "object",
            "required": [
                "name",
                "status",
                "id"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "description": "image name"
                },
                "id": {
                    "type": "string",
                    "description": "image UUID"
                },
                "imageType": {
                    "type": "string",
                    "description": "image type: ami, ari, aki, vhd, vhdx, vmdk, raw, qcow2, vdi, iso"
                },
                "imagePath": {
                    "type": "string",
                    "description": "image url to catalog"
                },
                "containerFormat": {
                    "type": "string",
                    "description": "image container format: ami, ari, aki, bare, ovf, ova,  docker"
                },
                "visibility": {
                    "type": "string",
                    "description": "public, private, shared, or community"
                },
                "properties": {
                    "type": "array",
                    "description": "list of properties",
                    "items": {
                       "$ref": "#/definitions/VimImagePropertyInfo"
                    }
                },
                "status": {
                    "type": "string",
                    "description": "image status"
                },
                "size": {
                    "type": "string",
                    "description": "image size"
                },
                "vimId": {
                    "type": "string"
                },
                "vimName": {
                    "type": "string"
                },
                "tenantId": {
                    "type": "string",
                    "description": "tenant UUID"
                },
                "returnCode": {
                    "type": "integer",
                    "description": "0: Already exist 1: Newly created"
                }
            }
        }
    }
}