Skip to content

Commit

Permalink
Merge branch 'main' into tf-recipe-events
Browse files Browse the repository at this point in the history
  • Loading branch information
sk593 authored Jan 16, 2024
2 parents b3b6593 + d7cdbf2 commit e41201a
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 115 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Bug Report
description: Report broken functionality within Radius
title: "<BUG TITLE>"
labels: ["bug"]
body:
- type: markdown
attributes:
value: "## Bug information"
- type: textarea
attributes:
label: Steps to reproduce
description: How can we recreate this bug? Be specific.
validations:
required: true
- type: textarea
attributes:
label: Observed behavior
description: What you're experiencing that you believe is a bug.
placeholder: |
If applicable, add screenshots to help explain your problem.
Tip: You can attach images or files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: textarea
attributes:
label: Desired behavior
description: What you're expecting to happen.
validations:
required: true
- type: textarea
attributes:
label: Workaround
description: Have you found a workaround to get you unblocked?
validations:
required: false
- type: markdown
attributes:
value: "## System information"
- type: textarea
attributes:
label: rad Version
description: What rad cli version are you running?
placeholder: PASTE OUTPUT OF "rad version"
validations:
required: true
- type: textarea
attributes:
label: Operating system
description: What operating system (macOS Monterey, Windows 11, etc.) and architecture (x86, x64, arm64, etc.) are you running?
placeholder: |
For example: macOS Monterey, M1 chip
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here.
placeholder: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
attributes:
label: Would you like to support us?
description: Would you like to support us in fixing this bug?
options:
- label: Yes, I would like to support you
required: false
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/engineering.md

This file was deleted.

71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/engineering.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Engineering Improvement
description: Report problems or suggestions to improve the Radius engineering processes and/or pipelines
title: "<TITLE>"
labels: ["maintenance"]
body:
- type: markdown
attributes:
value: "## Engineering Improvement"
- type: textarea
attributes:
label: Area for Improvement
description: What engineering process or tools can be improved? Build? Testing? ...? Be specific.
validations:
required: true
- type: textarea
attributes:
label: Observed behavior
description: What you're experiencing that you believe could be improved.
placeholder: |
If applicable, add screenshots to help explain your problem.
Tip: You can attach images or files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: textarea
attributes:
label: Desired behavior
description: What you'd like to happen.
validations:
required: true
- type: textarea
attributes:
label: Proposed Fix
description: Have you found a way to implement or fix the issue?
validations:
required: false
- type: markdown
attributes:
value: "## System information"
- type: textarea
attributes:
label: rad Version
description: What rad cli version are you running?
placeholder: PASTE OUTPUT OF "rad version"
validations:
required: true
- type: textarea
attributes:
label: Operating system
description: What operating system (macOS Monterey, Windows 11, etc.) and architecture (x86, x64, arm64, etc.) are you running?
placeholder: |
For example: macOS Monterey, M1 chip
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here
placeholder: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
attributes:
label: Would you like to support us?
description: Would you like to support us in improving Radius engineering processes and/or pipelines?
options:
- label: Yes, I would like to support you
required: false
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/feature.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Feature Request
description: Request a feature in Radius
title: "<FEATURE TITLE>"
labels: ["feature"]
body:
- type: textarea
attributes:
label: Overview of feature request
description: What are you proposing Radius add/update/remove?
validations:
required: true
- type: textarea
attributes:
label: Acceptance criteria
description: What will need to be completed/working for this feature to be marked "Done"?
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here
placeholder: |
Links? References? Anything that will give us more context about the feature you are looking for!
Tip: You can attach images or files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
attributes:
label: Would you like to support us?
description: Would you like to support us in implementing the feature?
options:
- label: Yes, I would like to support you
required: false
29 changes: 29 additions & 0 deletions deploy/Chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,32 @@
{{- end -}}
{{- print $version }}
{{- end -}}

{{/*
Reuses the value from an existing secret, otherwise sets its value to a default value.
Usage:
{{ include "secrets.lookup" (dict "secret" "secret-name" "namespace" "ns-name" "key" "key-name" "defaultValue" "default-secret") }}

Params:
- secret - String - Required - Name of the 'Secret' resource where the password is stored.
- namespace - String - Required - Namespace of the 'Secret' resource where the password is stored.
- key - String - Required - Name of the key in the secret.
- defaultValue - String - Required - Default value to use if the secret does not exist.

References:
- https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_secrets.tpl
*/}}
{{- define "secrets.lookup" -}}
{{- $value := "" -}}
{{- $namespace := .namespace | toString -}}
{{- $secretData := (lookup "v1" "Secret" $namespace .secret).data -}}
{{- if and $secretData (hasKey $secretData .key) -}}
{{- $value = index $secretData .key -}}
{{- else if .defaultValue -}}
{{- $value = .defaultValue | toString | b64enc -}}
{{- end -}}
{{- if $value -}}
{{- printf "%s" $value -}}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "controller-cert"}}
{{- $existingWebhook := lookup "admissionregistration.k8s.io/v1" "ValidatingWebhookConfiguration" .Release.Namespace "recipe-webhook.radapp.io"}}
{{- $ca := genCA "controller-ca" 3650 }}
{{- $cn := printf "controller" }}
{{- $altName1 := printf "controller.%s" .Release.Namespace }}
Expand All @@ -15,14 +13,11 @@ metadata:
labels:
app.kubernetes.io/name: controller
app.kubernetes.io/part-of: radius
type: kubernetes.io/tls
data:
{{ if $existingSecret }}tls.crt: {{ index $existingSecret.data "tls.crt" }}
{{ else }}tls.crt: {{ b64enc $cert.Cert }}
{{ end }}

{{ if $existingSecret }}tls.key: {{ index $existingSecret.data "tls.key" }}
{{ else }}tls.key: {{ b64enc $cert.Key }}
{{ end }}
tls.crt: {{ include "secrets.lookup" (dict "secret" "controller-cert" "namespace" .Release.Namespace "key" "tls.crt" "defaultValue" $cert.Cert) }}
tls.key: {{ include "secrets.lookup" (dict "secret" "controller-cert" "namespace" .Release.Namespace "key" "tls.key" "defaultValue" $cert.Key) }}
ca.crt: {{ include "secrets.lookup" (dict "secret" "controller-cert" "namespace" .Release.Namespace "key" "ca.crt" "defaultValue" $ca.Cert) }}
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand All @@ -32,7 +27,7 @@ webhooks:
- admissionReviewVersions:
- v1
clientConfig:
caBundle: {{ b64enc $ca.Cert }}
caBundle: {{ include "secrets.lookup" (dict "secret" "controller-cert" "namespace" .Release.Namespace "key" "ca.crt" "defaultValue" $ca.Cert) }}
service:
name: controller
namespace: {{ .Release.Namespace }}
Expand Down
15 changes: 5 additions & 10 deletions deploy/Chart/templates/ucp/apiservice.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "ucp-cert"}}
{{- $existingApiService := lookup "apiregistration.k8s.io/v1" "APIService" .Release.Namespace "v1alpha3.api.ucp.dev"}}
{{- $ca := genCA "ucp-ca" 3650 }}
{{- $cn := printf "ucp" }}
{{- $altName1 := printf "ucp.%s" .Release.Namespace }}
Expand All @@ -15,14 +13,11 @@ metadata:
labels:
app.kubernetes.io/name: ucp
app.kubernetes.io/part-of: radius
type: kubernetes.io/tls
data:
{{ if $existingSecret }}tls.crt: {{ index $existingSecret.data "tls.crt" }}
{{ else }}tls.crt: {{ b64enc $cert.Cert }}
{{ end }}

{{ if $existingSecret }}tls.key: {{ index $existingSecret.data "tls.key" }}
{{ else }}tls.key: {{ b64enc $cert.Key }}
{{ end }}
tls.crt: {{ include "secrets.lookup" (dict "secret" "ucp-cert" "namespace" .Release.Namespace "key" "tls.crt" "defaultValue" $cert.Cert) }}
tls.key: {{ include "secrets.lookup" (dict "secret" "ucp-cert" "namespace" .Release.Namespace "key" "tls.key" "defaultValue" $cert.Key) }}
ca.crt: {{ include "secrets.lookup" (dict "secret" "ucp-cert" "namespace" .Release.Namespace "key" "ca.crt" "defaultValue" $ca.Cert) }}
---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
Expand All @@ -39,4 +34,4 @@ spec:
name: ucp
namespace: {{ .Release.Namespace }}
version: v1alpha3
caBundle: {{ if $existingApiService }}{{ $existingApiService.spec.caBundle }}{{ else }}{{ b64enc $ca.Cert }}{{ end }}
caBundle: {{ include "secrets.lookup" (dict "secret" "ucp-cert" "namespace" .Release.Namespace "key" "ca.crt" "defaultValue" $ca.Cert) }}

0 comments on commit e41201a

Please sign in to comment.