wso2 / k8s-api-operator

API Operator for Kubernetes
Apache License 2.0
115 stars 48 forks source link

[1.2.x] Support Endpoint certificates and User volumes for Kaniko Job with Volume Context #598

Closed renuka-fernando closed 3 years ago

renuka-fernando commented 3 years ago

Purpose

Sample exported API from APIM 3.2.0

Products-v1
├── Meta-information
│   ├── api.yaml
│   ├── endpoint_certificates.yaml
│   └── swagger.yaml
└── api_params.yaml

sample API CR

apiVersion: wso2.com/v1alpha1
kind: API
metadata:
  name: test-api-publisher
  namespace: wso2-system
spec:
  definition:
    endpointCertificates:
    - foo-1-ep-crt-1
    interceptors: {}
    swaggerConfigmapNames:
    - foo-1-swagger
    type: swagger
  mode: privateJet
  override: true
  replicas: 1

Sample EP Cert

apiVersion: v1
data:
  alias: cHJvZHVjdHMtLTIy
  certificate.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUUzRENDQXNRQ0NRQ1VodU9Jb3VVSGlqQU5CZ2txaGtpRzl3MEJBUXNGQURBd01SVXdFd1lEVlFRS0RBeG1iMjh1WTI5dElFbHVZeTR4RnpBVkJnTlZCQU1NRG5CeWIyUjFZM1J6TFdoMGRIQnpNQjRYRFRJeE1EVXdOREEyTkRZMU1Gb1hEVEl5TURVd05EQTJORFkxTUZvd01ERVZNQk1HQTFVRUNnd01abTl2TG1OdmJTQkpibU11TVJjd0ZRWURWUVFEREE1d2NtOWtkV04wY3kxb2RIUndjekNDQWlJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dJUEFEQ0NBZ29DZ2dJQkFOSmJFMlBhOTMwSWM2UzhMQ1BzN3BqVW9vOFRTNXJKVE11MFIvdExaWmdCS3RIVFhrL29KMUFCU3duRGJXQW4xYVNzbklhY3JmRFI2TkpUQW4zdHpNQmQ0OHhnQXdldGZ2ZkJVaGduSzduMVJLQnVUc0lWSWI0NUJTby93MlQvY3NxcENEUitWNzc2cHNOMjUvaFBUejd4Qmh5WkZoNlNLcTVWYWt1SXNjejRZSit1aHRrTjNNc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HN1dPMi8zcytwN2lPdGcrLzNTbFg1Y1hISWhMZ3I0SzQzRjM1SXh0eFJ6QWlFZmtOcmxvaDJqYUcxeGd6RkxzR2c3L2hsVDlLNEc4RlZ3YlRONUZYRUdqUk1kOGpEVm1oSjV6ZVFUU1hsdU5VUkF2R1FHNlBCakhwY2pEeUR4QjQ4Y3pzWEhOcnJRVlNucjdHUGJKRExiNlJ6aHEzM1VibHJiWUZBOEIwT01IZHFjUjZ6NXdRVEFxUDdwQlVQbkZjajBSSGEwN2VtV1pSZG5DNFN2S0ZiUE1GWXRVT05qaDhFNExuL0pVVm1KaEV6bURsQnNza3ZSTTc5aDRVVjdlcGQzOThlUXBSb0VWU2xpcmY2OWx5bi9oODZUdlNSWVF2d1VNYmhMZ1RJT255bXl3Ukw5MFIzQ0pQTXYrZVhneG5raXYrb2JtckRnLzMxV2cxbnFLMUVUbWlaWldzTXhOK1J4R3c2b3Fhak5qS2VlemYwNnRONTdKRGRIdUhxUzlta3VCZ3A5VmVLY1F6RU9OeUxpTmdzaHBuQnBROS9qYzdDbnFyT1g0UmMvMUVVNVNSM3U1Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
  hostName: aHR0cHM6Ly9sb2NhbGhvc3QyOjg0NDM=
kind: Secret
metadata:
  name: foo-1-ep-crt-1
  namespace: default
type: Opaque

Sample kaniko User volume

  mgwSecrets: |
   - name: test1secret
     mountLocation: /home/ballerina/test1secret
     subPath: test1secret
     namespace: micro
   - name: test1secretEnv
     asEnvVar: true
     context: kaniko

Documentation

Docs will be updated

Test environment

with private HTTPS registry Docker Desktop