dotnet / tye

Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with minimal configuration.
MIT License
5.28k stars 520 forks source link

Error when deploying with https bindings #562

Open JamesNK opened 4 years ago

JamesNK commented 4 years ago

I get an error when deploying with tye when tye.yaml is configured with https bindings.

name: microservice
services:
- name: frontend
  project: frontend/frontend.csproj
  bindings:
  - protocol: https
    port: 5001
- name: backend
  project: backend/backend.csproj
  bindings:
  - protocol: https
    port: 5002

I am using k8s with Docker for Windows.

Output:

C:\Development\Temp\microservice> tye --version
0.3.0-alpha.20319.3+4c7d799624984bba1f0622a0aef92b37a9ece5a8
C:\Development\Temp\microservice> tye deploy
Loading Application Details...
Processing Service 'frontend'...
    Applying container defaults...
    Compiling Services...
    Publishing Project...
    Building Docker Image...
        Created Docker Image: 'jamesnk/frontend:1.0.0'
    Pushing Docker Image...
        Pushed docker image: 'jamesnk/frontend:1.0.0'
    Validating Secrets...
    Generating Manifests...
Processing Service 'backend'...
    Applying container defaults...
    Compiling Services...
    Publishing Project...
    Building Docker Image...
        Created Docker Image: 'jamesnk/backend:1.0.0'
    Pushing Docker Image...
        Pushed docker image: 'jamesnk/backend:1.0.0'
    Validating Secrets...
    Generating Manifests...
Deploying Application Manifests...

        Writing output to 'C:\Users\James\AppData\Local\Temp\tmpA3C0.tmp'.
            Error from server (Invalid): error when creating "C:\\Users\\James\\AppData\\Local\\Temp\\tmpA3C0.tmp": Service "frontend" is invalid: spec.ports: Required value
            Error from server (Invalid): error when creating "C:\\Users\\James\\AppData\\Local\\Temp\\tmpA3C0.tmp": Service "backend" is invalid: spec.ports: Required value
Drats! 'deploy' failed:
        'kubectl apply' failed.
jkotalik commented 4 years ago

https://github.com/dotnet/tye/blob/master/src/Microsoft.Tye.Core/CombineStep.cs#L93, we need to do work for certs and https for deploy.

JamesNK commented 4 years ago

Should log a warning to the console when there is an https binding.

jongio commented 4 years ago

Do we have timing for HTTPS support? Need for Azure SDK / Azurite / Storage Explorer integration.

Thanks

azsdke2e azsdke2e2