Skip to content

Commit

Permalink
Merge branch 'main' into andrew/web-1962-hide-section-box
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwallacespeckle committed Oct 21, 2024
2 parents 1697b12 + 5b8ec1b commit 410aa1b
Show file tree
Hide file tree
Showing 3 changed files with 288 additions and 0 deletions.
87 changes: 87 additions & 0 deletions utils/helm/speckle-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,93 @@ Generate the environment variables for Speckle server and Speckle objects deploy
- name: FF_BILLING_INTEGRATION_ENABLED
value: {{ .Values.featureFlags.billingIntegrationEnabled | quote }}


{{- if .Values.featureFlags.billingIntegrationEnabled }}
- name: STRIPE_API_KEY
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.stripeApiKey.secretKey }}

- name: STRIPE_ENDPOINT_SIGNING_KEY
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.stripeEndpointSigningKey.secretKey }}

- name: WORKSPACE_GUEST_SEAT_STRIPE_PRODUCT_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceGuestSeatStripeProductId.secretKey }}

- name: WORKSPACE_MONTHLY_GUEST_SEAT_STRIPE_PRICE_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceMonthlyGuestSeatStripePriceId.secretKey }}

- name: WORKSPACE_YEARLY_GUEST_SEAT_STRIPE_PRICE_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceYearlyGuestSeatStripePriceId.secretKey }}

- name: WORKSPACE_TEAM_SEAT_STRIPE_PRODUCT_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceTeamSeatStripeProductId.secretKey }}

- name: WORKSPACE_MONTHLY_TEAM_SEAT_STRIPE_PRICE_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceMonthlyTeamSeatStripePriceId.secretKey }}

- name: WORKSPACE_YEARLY_TEAM_SEAT_STRIPE_PRICE_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceYearlyTeamSeatStripePriceId.secretKey }}

- name: WORKSPACE_PRO_SEAT_STRIPE_PRODUCT_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceProSeatStripeProductId.secretKey }}

- name: WORKSPACE_MONTHLY_PRO_SEAT_STRIPE_PRICE_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceMonthlyProSeatStripePriceId.secretKey }}

- name: WORKSPACE_YEARLY_PRO_SEAT_STRIPE_PRICE_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceYearlyProSeatStripePriceId.secretKey }}

- name: WORKSPACE_BUSINESS_SEAT_STRIPE_PRODUCT_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceBusinessSeatStripeProductId.secretKey }}

- name: WORKSPACE_MONTHLY_PRO_SEAT_STRIPE_PRICE_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceMonthlyBusinessSeatStripePriceId.secretKey }}

- name: WORKSPACE_YEARLY_PRO_SEAT_STRIPE_PRICE_ID
valueFrom:
secretKeyRef:
name: "{{ default .Values.secretName .Values.server.billing.secretName }}"
key: {{ .Values.server.billing.workspaceYearlyBusinessStripePriceId.secretKey }}
{{- end }}

{{- if .Values.featureFlags.automateModuleEnabled }}
- name: SPECKLE_AUTOMATE_URL
value: {{ .Values.server.speckleAutomateUrl }}
Expand Down
150 changes: 150 additions & 0 deletions utils/helm/speckle-server/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,156 @@
}
}
},
"billing": {
"type": "object",
"properties": {
"secretName": {
"type": "string",
"description": "The name of the Kubernetes Secret containing the Session secret. This is a unique value (can be generated randomly). This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets",
"default": ""
},
"stripeApiKey": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the stripeApiKey secret as its value.",
"default": "stripeApiKey"
}
}
},
"stripeEndpointSigningKey": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the stripeEndpointSigningKey secret as its value.",
"default": "stripeEndpointSigningKey"
}
}
},
"workspaceGuestSeatStripeProductId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceGuestSeatStripeProductId secret as its value.",
"default": "workspaceGuestSeatStripeProductId"
}
}
},
"workspaceMonthlyGuestSeatStripePriceId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceMonthlyGuestSeatStripePriceId secret as its value.",
"default": "workspaceMonthlyGuestSeatStripePriceId"
}
}
},
"workspaceYearlyGuestSeatStripePriceId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceYearlyGuestSeatStripePriceId secret as its value.",
"default": "workspaceYearlyGuestSeatStripePriceId"
}
}
},
"workspaceTeamSeatStripeProductId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceTeamSeatStripeProductId secret as its value.",
"default": "workspaceTeamSeatStripeProductId"
}
}
},
"workspaceMonthlyTeamSeatStripePriceId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceMonthlyTeamSeatStripePriceId secret as its value.",
"default": "workspaceMonthlyTeamSeatStripePriceId"
}
}
},
"workspaceYearlyTeamSeatStripePriceId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceYearlyTeamSeatStripePriceId secret as its value.",
"default": "workspaceYearlyTeamSeatStripePriceId"
}
}
},
"workspaceProSeatStripeProductId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceProSeatStripeProductId secret as its value.",
"default": "workspaceProSeatStripeProductId"
}
}
},
"workspaceMonthlyProSeatStripePriceId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceMonthlyProSeatStripePriceId secret as its value.",
"default": "workspaceMonthlyProSeatStripePriceId"
}
}
},
"workspaceYearlyProSeatStripePriceId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceYearlyProSeatStripePriceId secret as its value.",
"default": "workspaceYearlyProSeatStripePriceId"
}
}
},
"workspaceBusinessSeatStripeProductId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceBusinessSeatStripeProductId secret as its value.",
"default": "workspaceBusinessSeatStripeProductId"
}
}
},
"workspaceMonthlyBusinessSeatStripePriceId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceMonthlyBusinessSeatStripePriceId secret as its value.",
"default": "workspaceMonthlyBusinessSeatStripePriceId"
}
}
},
"workspaceYearlyBusinessSeatStripePriceId": {
"type": "object",
"properties": {
"secretKey": {
"type": "string",
"description": "The key within the Kubernetes Secret holding the workspaceYearlyBusinessSeatStripePriceId secret as its value.",
"default": "workspaceYearlyBusinessSeatStripePriceId"
}
}
}
}
},
"sessionSecret": {
"type": "object",
"properties": {
Expand Down
51 changes: 51 additions & 0 deletions utils/helm/speckle-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,57 @@ server:
##
secretKey: ''

## @extra server.billing Values to enable billing integration on the server
billing:
## @param server.billing.secretName The name of the Kubernetes Secret containing the Session secret. This is a unique value (can be generated randomly). This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets
secretName: ''

stripeApiKey:
## @param server.billing.stripeApiKey.secretKey The key within the Kubernetes Secret holding the stripeApiKey secret as its value.
secretKey: 'stripeApiKey'
stripeEndpointSigningKey:
## @param server.billing.stripeEndpointSigningKey.secretKey The key within the Kubernetes Secret holding the stripeEndpointSigningKey secret as its value.
secretKey: 'stripeEndpointSigningKey'
workspaceGuestSeatStripeProductId:
## @param server.billing.workspaceGuestSeatStripeProductId.secretKey The key within the Kubernetes Secret holding the workspaceGuestSeatStripeProductId secret as its value.
secretKey: 'workspaceGuestSeatStripeProductId'
workspaceMonthlyGuestSeatStripePriceId:
## @param server.billing.workspaceMonthlyGuestSeatStripePriceId.secretKey The key within the Kubernetes Secret holding the workspaceMonthlyGuestSeatStripePriceId secret as its value.
secretKey: 'workspaceMonthlyGuestSeatStripePriceId'
workspaceYearlyGuestSeatStripePriceId:
## @param server.billing.workspaceYearlyGuestSeatStripePriceId.secretKey The key within the Kubernetes Secret holding the workspaceYearlyGuestSeatStripePriceId secret as its value.
secretKey: 'workspaceYearlyGuestSeatStripePriceId'

workspaceTeamSeatStripeProductId:
## @param server.billing.workspaceTeamSeatStripeProductId.secretKey The key within the Kubernetes Secret holding the workspaceTeamSeatStripeProductId secret as its value.
secretKey: 'workspaceTeamSeatStripeProductId'
workspaceMonthlyTeamSeatStripePriceId:
## @param server.billing.workspaceMonthlyTeamSeatStripePriceId.secretKey The key within the Kubernetes Secret holding the workspaceMonthlyTeamSeatStripePriceId secret as its value.
secretKey: 'workspaceMonthlyTeamSeatStripePriceId'
workspaceYearlyTeamSeatStripePriceId:
## @param server.billing.workspaceYearlyTeamSeatStripePriceId.secretKey The key within the Kubernetes Secret holding the workspaceYearlyTeamSeatStripePriceId secret as its value.
secretKey: 'workspaceYearlyTeamSeatStripePriceId'

workspaceProSeatStripeProductId:
## @param server.billing.workspaceProSeatStripeProductId.secretKey The key within the Kubernetes Secret holding the workspaceProSeatStripeProductId secret as its value.
secretKey: 'workspaceProSeatStripeProductId'
workspaceMonthlyProSeatStripePriceId:
## @param server.billing.workspaceMonthlyProSeatStripePriceId.secretKey The key within the Kubernetes Secret holding the workspaceMonthlyProSeatStripePriceId secret as its value.
secretKey: 'workspaceMonthlyProSeatStripePriceId'
workspaceYearlyProSeatStripePriceId:
## @param server.billing.workspaceYearlyProSeatStripePriceId.secretKey The key within the Kubernetes Secret holding the workspaceYearlyProSeatStripePriceId secret as its value.
secretKey: 'workspaceYearlyProSeatStripePriceId'

workspaceBusinessSeatStripeProductId:
## @param server.billing.workspaceBusinessSeatStripeProductId.secretKey The key within the Kubernetes Secret holding the workspaceBusinessSeatStripeProductId secret as its value.
secretKey: 'workspaceBusinessSeatStripeProductId'
workspaceMonthlyBusinessSeatStripePriceId:
## @param server.billing.workspaceMonthlyBusinessSeatStripePriceId.secretKey The key within the Kubernetes Secret holding the workspaceMonthlyBusinessSeatStripePriceId secret as its value.
secretKey: 'workspaceMonthlyBusinessSeatStripePriceId'
workspaceYearlyBusinessSeatStripePriceId:
## @param server.billing.workspaceYearlyBusinessSeatStripePriceId.secretKey The key within the Kubernetes Secret holding the workspaceYearlyBusinessSeatStripePriceId secret as its value.
secretKey: 'workspaceYearlyBusinessSeatStripePriceId'

sessionSecret:
## @param server.sessionSecret.secretName The name of the Kubernetes Secret containing the Session secret. This is a unique value (can be generated randomly). This is expected to be provided within the Kubernetes cluster as an opaque Kubernetes Secret. Ref: https://kubernetes.io/docs/concepts/configuration/secret/#opaque-secrets
##
Expand Down

0 comments on commit 410aa1b

Please sign in to comment.