The Shipa Developer Hub

Welcome to the Shipa developer hub. You'll find comprehensive guides and documentation to help you start working with Shipa as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Changelog

Application Management

By leveraging Shipa, you can provide developers with an easier and seamless way to deploy their applications across multiple Kubernetes clusters and Linux nodes.

Creating Applications

The code snippet below creates an application on Shipa.

apiVersion: shipa.crossplane.io/v1alpha1
kind: App
metadata:
  name: payment-service-app-create
spec:
  forProvider:
    name: booking-service
    teamowner: shipa-admin-team
    framework: cp-prod
    description: test app
    tags: ["dev", "sandbox", "updated"]

Top-Level Attributes

Here are the attributes that provide top-level information about each component definition.

Component

Type

Description

apiVersion

string

the version of the API.

kind

string

the kind of custom resource that will be created by Shipa.

App is the kind used by Shipa for creating applications.

metadata

the name of the custom resource that will be created by Shipa.

spec

the specification that will be used by Shipa when creating the application.

Metadata

Component

Type

Description

name

string

the name of the custom resource that will be created by Shipa

Specification

Component

Type

Description

name

string

the name of the application.

Required: Yes

teamowner

string

the name of the team who will own the application.

Required: Yes

framework

string

the name of the framework that should be used for creating the application.

Required: Yes

description

string

application description.

Required: No

tags

string

a list of tags that should be assigned to the application.

Required: No

Environment Variables

The code snippet below creates environment variables to an existing application on Shipa.

📘

Dependency

When assigning environment variables, ensure the application is created before the environment variables are assigned.

apiVersion: shipa.crossplane.io/v1alpha1
kind: AppEnv
metadata:
  name: booking-service-env
spec:
  forProvider:
    app: booking-service
    app_env:
      envs:
        - name: VAR-NAME
          value: VAR-VALUE
        - name: VAR-NAME2
          value: VAR-VALUE2
      norestart: true
      private: true

Top-Level Attributes

Here are the attributes that provide top-level information about each component definition.

Component

Type

Description

apiVersion

string

the version of the API.

kind

string

the kind of custom resource that will be created by Shipa.

AppEnv is the kind used by Shipa for managing environment variables.

metadata

the name of the custom resource that will be created by Shipa.

spec

the specification that will be used by Shipa when creating the environment variables.

Metadata

Component

Type

Description

name

string

the name of the custom resource that will be created by Shipa.

Specification

Component

Type

Description

app

string

the name of an existing application that should be used when binding the new environment variables.

Required: Yes

app_env

details of the environment variables that should be created

norestart

bool

if the application should be restarted when environment variables are added or removed.

If not specified, the application won't be restarted automatically.

Required: No

private

bool

if the values of the environment variables being set should be displayed encrypted.

If not specified, the environment variable values will be displayed in plain text.

Required: No

Application Variables

Multiple environment variables can be set at once when creating the environment variables.

Component

Type

Description

name

string

the name of the environment variable to be set

Required: Yes

value

string

the value that should be assigned to the environment variable

Required: Yes

Deploying Applications

The code snippet below deploys an application using Shipa.

apiVersion: shipa.crossplane.io/v1alpha1
kind: AppDeploy
metadata:
  name: app-deploy-1
spec:
  forProvider:
    app: crossplane-app
    image: "docker.io/shipasoftware/bulletinboard:1.0"
    private-image: true
    registry-user: "Test user"
    registry-secret: "Test Secret"
    steps: 2
    step-weight: 1
    step_interval: 1m
    port: 8000

Top-Level Attributes

Here are the attributes that provide top-level information about each component definition.

Component

Type

Description

apiVersion

string

the version of the API.

kind

string

AppDeploy is the kind used by Shipa for deploying applications.

metadata

the name of the custom resource that will be created by Shipa.

spec

the specification that will be used by Shipa when deploying the application.

Metadata

Component

Type

Description

name

string

the name of the custom resource that will be created by Shipa.

Specification

Component

Type

Description

app

string

the name of the application where deployment should happen.

Required: Yes

image

string

the address of the image that should be used by Shipa for deployment.

Required: Yes

private-image

bool

if the image is hosted in a private registry.

If not specified, Shipa will assume the image is hosted in a public registry.

Required: No

registry-user

string

the username of the private registry for authentication, so Shipa can pull the image.

Required: No
Condition: Only when private-image is set to true

registry-secret

string

the password of the private registry for authentication, so Shipa can pull the image.

Required: No
Condition: Only when private-image is set to true

steps

int

how many steps should be used for deploying a new version to the application, when using canary.

If not used, Shipa will deploy the new version and shift 100% of the traffic to the new version

Required: No

step-weight

int

the weight of traffic that should shift to the new version on each step.

If not used, Shipa will deploy the new version and shift 100% of the traffic to the new version

Required: No

step_interval

string

the wait time between each step.

If not used, Shipa will deploy the new version and shift 100% of the traffic to the new version

Required: No

port

int

a specific port that should be assigned to the application for it to be exposed.

If not specified, Shipa will automatically expose port 8888 to the application.

Required: No

CNAME Management

The code snippet below adds a CNAME entry to an existing application:

apiVersion: shipa.crossplane.io/v1alpha1
kind: AppCname
metadata:
  name: cp-app-v1-cname
spec:
  forProvider:
    app: cp-app-v1
    cname: test.com
    encrypt: yes

Top-Level Attributes

Here are the attributes that provide top-level information about each component definition.

Component

Type

Description

apiVersion

string

the version of the API.

kind

string

AppCname is the kind used by Shipa for assigning a CNAME to an existing application.

metadata

the name of the custom resource that will be created by Shipa.

spec

the specification that will be used by Shipa when deploying the application.

Metadata

Component

Type

Definition

name

string

the name of the custom resource that will be created by Shipa.

Specification

Component

Type

Definition

app

string

the name of the application where deployment should happen.

Required: Yes

cname

string

the CNAME you want to assign to your existing application.

encrypt

bool

if Shipa should automatically create a certificate and assign to your CNAME so your application is served over HTTPS.

Required: No

Networking Management

The code snippet below adds a network policy entry to an existing application:

apiVersion: shipa.crossplane.io/v1alpha1
kind: NetworkPolicy
metadata:
  name: netpolicy-k8-app1
spec:
  forProvider:
    app: k8-app1
    networkPolicy:
      ingress:
        policy_mode: allow-custom-rules-only
        custom_rules:
          - id: framework
            enabled: true
            description: framework block
            allowed_apps:
              - app1
              - app2
            allowed_frameworks:
              - cp-prod
            ports:
              - port: 8080
                protocol: TCP
      egress:
        policy_mode: allow-all
      restart_app: true

Top-Level Attributes

Here are the attributes that provide top-level information about each component definition.

Component

Type

Description

apiVersion

string

version

kind

string

NetworkPolicy is the kind used by Shipa for assigning a CNAME to an existing application.

metadata

the name of the custom resource that will be created by Shipa.

spec

the specification that will be used by Shipa when deploying the application.

Metadata

Component

Type

Description

name

string

the name of the custom resource that will be created by Shipa.

Specification

Component

Type

Description

ingress

ingress definition that will be applied to the application.

if not defined, Shipa will leverage the network policies defined at the framework level.

Required: No

policy_mode

string

the policy mode that should be applied to your application.

Current options from this provider are:

  • allow-all
  • deny-all
  • allow-custom-rules-only

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

custom_rules

if policy_mode is set to allow-custom-rules-only, you can define custom rules for detailed ingress or egress configuration for the application.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

id

string

the name of the custom rule.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

enabled

bool

if the custom rule is enabled by default or not for this application.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

description

string

The description of the custom rule being enforced.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

allowed_apps

string

the specific applications that communicate with your application.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

allowed_frameworks

string

allow traffic from applications deployed through this, or list of, frameworks.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

ports

port configuration where your application can accept ingress or egress.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

port

int

the specific port (or list of ports) where your application can accept ingress or egress.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

protocol

string

the protocol your application can accept ingress or egress.

Required: No
Condition: Only when policy_mode is set to allow-custom-rules-only

egress

egress definition that will be accepted by your application.

if not defined, Shipa will leverage the network policies defined at the framework level.

Required: No

restart_app

bool

if the application should be restarted automatically once the network policy is defined.

network policy is only in effect once the application is restarted. If not set to yes, the application won't be restarted and the new policy will only take effect when you restart the application manually.

Required: No

📘

Detailed network policies

Shipa enables you to define more granular network policies through its dashboard. If rules are overly complex, we recommend using the dashboard to define a sample framework and network policy.

Updated 3 months ago


Application Management


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.