Skip to content

Commit

Permalink
Merge branch 'release/0.31.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ljupcovangelski committed Sep 28, 2021
2 parents 57853e3 + 4b81209 commit 4ed7755
Show file tree
Hide file tree
Showing 18 changed files with 169 additions and 79 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.31.0
0.31.1
2 changes: 2 additions & 0 deletions cli/pkg/workspace/airy_yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ type IngressConf struct {
Https bool `yaml:"https,omitempty"`
LetsencryptEmail string `yaml:"letsencryptEmail,omitempty"`
LoadbalancerAnnotations map[string]string `yaml:"loadbalancerAnnotations,omitempty"`
HttpsTermination string `yaml:"httpsTermination,omitempty"`
HttpsCertificate string `yaml:"httpsCertificate,omitempty"`
}

type SecurityConf struct {
Expand Down
2 changes: 2 additions & 0 deletions cli/pkg/workspace/template/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ type Variables struct {
LoadbalancerAnnotations map[string]string
Https bool
LetsencryptEmail string
HttpsTermination string
HttpsCertificate string
}

//go:embed src
Expand Down
12 changes: 10 additions & 2 deletions cli/pkg/workspace/template/src/airy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@ kubernetes:
namespace: {{ .Namespace }}
ngrokEnabled: {{ default false .NgrokEnabled }}
ingress:
{{- if .Host }}
{{- if .Host }}
host: {{ default "airy.core" .Host }}
{{- end }}
{{- end }}
https: {{ default false .Https}}
{{- if .LetsencryptEmail }}
letsencryptEmail: {{ .LetsencryptEmail}}
{{- end }}
{{- if .HttpsTermination }}
httpsTermination: {{ .HttpsTermination}}
{{- end }}
{{- if .HttpsCertificate }}
httpsCertificate: {{ .HttpsCertificate}}
{{- end }}
{{- if .LoadbalancerAnnotations }}
loadbalancerAnnotations:
{{- range $k, $v := .LoadbalancerAnnotations }}
Expand Down
48 changes: 25 additions & 23 deletions docs/docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,36 @@ title: Changelog
sidebar_label: 📝 Changelog
---

## 0.31.1

#### 🚀 Features

- [[#2432](https://github.com/airyhq/airy/issues/2432)] Added more options to the UI [[#2433](https://github.com/airyhq/airy/pull/2433)]
- [[#2393](https://github.com/airyhq/airy/issues/2393)] Add more chatplugin options [[#2431](https://github.com/airyhq/airy/pull/2431)]

#### 🐛 Bug Fixes

- [[#2390](https://github.com/airyhq/airy/issues/2390)] Fix duplicate ingress port definition [[#2446](https://github.com/airyhq/airy/pull/2446)]
- [[#2390](https://github.com/airyhq/airy/issues/2390)] Fix serviceAccount for helm [[#2442](https://github.com/airyhq/airy/pull/2442)]

#### 🧰 Enhancements

- [[#2390](https://github.com/airyhq/airy/issues/2390)] HTTPS termination at LB level [[#2427](https://github.com/airyhq/airy/pull/2427)]

#### Airy CLI

You can download the Airy CLI for your operating system from the following links:

[MacOS](https://airy-core-binaries.s3.amazonaws.com/0.31.1/darwin/amd64/airy)
[Linux](https://airy-core-binaries.s3.amazonaws.com/0.31.1/linux/amd64/airy)
[Windows](https://airy-core-binaries.s3.amazonaws.com/0.31.1/windows/amd64/airy.exe)

## 0.31.0

#### 🚀 Features

- [[#628](https://github.com/airyhq/airy/issues/628)] Make library compatible with node.js [[#2426](https://github.com/airyhq/airy/pull/2426)]
- [[#2405](https://github.com/airyhq/airy/issues/2405)] Icons for Rendering/Sending File Attachments [[#2420](https://github.com/airyhq/airy/pull/2420)]
- [[#2405](https://github.com/airyhq/airy/issues/2405)] Icons for Rendering/Sending File Attachments [[#2420](https://github.com/airyhq/airy/pull/2420)]
- [[#2406](https://github.com/airyhq/airy/issues/2406)] Instagram Source: Render Messages with Media & Share in Inbox UI [[#2419](https://github.com/airyhq/airy/pull/2419)]
- [[#2109](https://github.com/airyhq/airy/issues/2109)] Render send file attachments via facebook messenger [[#2404](https://github.com/airyhq/airy/pull/2404)]
- [[#2257](https://github.com/airyhq/airy/issues/2257)] Add analytics demo [[#2325](https://github.com/airyhq/airy/pull/2325)]
Expand Down Expand Up @@ -1242,25 +1266,3 @@ You can download the Airy CLI for your operating system from the following links
[Linux](https://airy-core-binaries.s3.amazonaws.com/0.9.0/linux/amd64/airy)
[Windows](https://airy-core-binaries.s3.amazonaws.com/0.9.0/windows/amd64/airy.exe)

## 0.8.1

#### Changes

#### 🚀 Features

- [[#861](https://github.com/airyhq/airy/issues/861)] Render quick replies from facebook [[#942](https://github.com/airyhq/airy/pull/942)]
- [[#910](https://github.com/airyhq/airy/issues/910)] Add message metadata API documentation [[#937](https://github.com/airyhq/airy/pull/937)]
- [[#918](https://github.com/airyhq/airy/issues/918)] New Airy websocket using Airy events [[#928](https://github.com/airyhq/airy/pull/928)]
- [[#875](https://github.com/airyhq/airy/issues/875)] Improve Box component [[#924](https://github.com/airyhq/airy/pull/924)]
- [[#910](https://github.com/airyhq/airy/issues/910)] Add message metadata API [[#933](https://github.com/airyhq/airy/pull/933)]
- [[#856](https://github.com/airyhq/airy/issues/856)] Render Generic Template from Facebook [[#930](https://github.com/airyhq/airy/pull/930)]
- [[#855](https://github.com/airyhq/airy/issues/855)] Render Button Template from Facebook [[#921](https://github.com/airyhq/airy/pull/921)]

#### Airy CLI

You can download the Airy CLI for your operating system from the following links:

[MacOS](https://airy-core-binaries.s3.amazonaws.com/0.8.1/darwin/amd64/airy)
[Linux](https://airy-core-binaries.s3.amazonaws.com/0.8.1/linux/amd64/airy)
[Windows](https://airy-core-binaries.s3.amazonaws.com/0.8.1/windows/amd64/airy.exe)

31 changes: 9 additions & 22 deletions docs/docs/getting-started/installation/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,35 +200,22 @@ If you don't have your own HTTPS certificate you can request one from AWS ACM.

:::

#### Configure the ingress service
#### Upgrade your Airy Core instance

Locate and set your KUBECONFIG file and set the other environment variables:
Edit your `airy.yaml` file and add the following configuration:

```sh
export KUBECONFIG="PATH/TO/DIR/kube.conf"
export ARN="Your-unique-ACM-ARN"
export HOSTNAME="public-FQDN"
```

Modify the existing ingress service to reconfigure the AWS LoadBalancer:

```sh
kubectl -n kube-system annotate service ingress-nginx-controller "service.beta.kubernetes.io/aws-load-balancer-ssl-ports=443" "service.beta.kubernetes.io/aws-load-balancer-ssl-cert=${ARN}"
kubectl -n kube-system patch service ingress-nginx-controller --patch '{"spec": { "ports": [ { "name": "https", "port": 443, "protocol": "TCP", "targetPort": 80 } ] } }'
```

Update the `hostnames` configMap with the new https endpoint:

```sh
kubectl patch configmap hostnames --patch "{\"data\": { \"HOST\": \"https://${HOSTNAME}\"} }"
ingress:
host: "The-fqdn-used-in-your-certificate"
https: true
httpsTermination: "LoadBalancer"
httpsCertificate: "Your-unique-ACM-ARN"
```

Update the existing ingress resources with the new hostname (for this you will additionally require the [jq](https://stedolan.github.io/jq/download/) utility):
Upgrade your Airy Core instance

```sh
kubectl get ingress airy-core -o json | jq "(.spec.rules[0].host=\"${HOSTNAME}\")" | kubectl apply -f -
kubectl get ingress airy-core-ui -o json | jq "(.spec.rules[0].host=\"${HOSTNAME}\")" | kubectl apply -f -
kubectl get ingress airy-core-redirect -o json | jq "(.spec.rules[0].host=\"${HOSTNAME}\")" | kubectl apply -f -
airy upgrade
```

#### Setup your DNS
Expand Down
2 changes: 2 additions & 0 deletions docs/docs/sources/chatplugin/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ If you are happy with your customization, copy it and add this code inside the t
| sendMessageIcon | URL | Set your icon as `sendButton` and replace the default paperplane |
| startNewConversationText | string | Set the Start new Conversation text button of your Airy Chat Plugin |
| disableMobile | boolean | Disable the entire Airy Chat Plugin for mobile devices |
| hideInputBar | boolean | Disables the input bar of the Airy Chat Plugin |
| hideEmojis | boolean | Disables the emojis in the input bar of the Airy Chat Plugin |
| bubbleState | 'expanded', 'minimized' | Set the behaviour of the chatplugin to be always expanded or always minimized |
| closeMode | 'basic', 'medium', 'full' | Choose one of the different option to close the chatplugin and start a new conversation |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
align-self: flex-end;
cursor: pointer;
margin-bottom: 1px;
display: flex;
align-items: center;
justify-content: center;

img {
display: block;
Expand All @@ -116,7 +119,7 @@

svg {
width: 18px;
height: 20px;
height: 18px;
}
}

Expand All @@ -141,6 +144,7 @@
align-items: center;
position: relative;
height: 30px;
margin-right: 4px;
background: transparent;
border: none;
cursor: pointer;
Expand Down
38 changes: 20 additions & 18 deletions frontend/chat-plugin/lib/src/airyRenderProps/AiryInputBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,24 +130,26 @@ const AiryInputBar = (props: AiryInputBarProps) => {

return (
<>
<form className={style.inputBar} onSubmit={onSubmit}>
<textarea
ref={textInputRef}
className={style.textArea}
placeholder={'Start typing...'}
autoFocus={isMobileDevice ? false : !config.showMode}
onChange={handleChange}
onKeyDown={handleKeyDown}
value={props.messageString}
data-cy={dataCyTextareaId}
/>
<div className={style.buttonContainer}>
<InputOptions />
<button className={style.sendButton} type="submit" data-cy={dataCyButtonId}>
{config?.sendMessageIcon ? <img src={config.sendMessageIcon} alt={'send message'} /> : <Paperplane />}
</button>
</div>
</form>
{!(config.hideInputBar === true) && (
<form className={style.inputBar} onSubmit={onSubmit}>
<textarea
ref={textInputRef}
className={style.textArea}
placeholder={'Start typing...'}
autoFocus={isMobileDevice ? false : !config.showMode}
onChange={handleChange}
onKeyDown={handleKeyDown}
value={props.messageString}
data-cy={dataCyTextareaId}
/>
<div className={style.buttonContainer}>
{!(config.hideEmojis === true) && <InputOptions />}
<button className={style.sendButton} type="submit" data-cy={dataCyButtonId}>
{config?.sendMessageIcon ? <img src={config.sendMessageIcon} alt={'send message'} /> : <Paperplane />}
</button>
</div>
</form>
)}
<div className={style.poweredByContainer}>
<a
href="https://airy.co/?utm_source=airy&utm_medium=chat&utm_campaign=chat-plugin-demo"
Expand Down
2 changes: 2 additions & 0 deletions frontend/chat-plugin/lib/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export type Config = {
disableMobile?: boolean;
bubbleState?: 'expanded' | 'minimized';
closeMode?: 'basic' | 'medium' | 'full';
hideInputBar?: boolean;
hideEmojis?: boolean;
};

export type AuthConfiguration = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
width: 100%;
padding: 32px;
margin: 88px 1.5em 0 16px;
min-height: calc(100vh - 170px);
height: calc(100vh - 88px);
overflow-y: scroll;
}

.headline {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
const [height, setHeight] = useState('700');
const [width, setWidth] = useState('350');
const [disableMobile, setDisableMobile] = useState(false);
const [hideInputBar, setHideInputBar] = useState(false);
const [hideEmojis, setHideEmojis] = useState(false);
const [closingOption, setClosingOption] = useState<CloseOption>(CloseOption.full);
const [bubbleState, setBubbleState] = useState<BubbleState>(BubbleState.expanded);

Expand Down Expand Up @@ -110,6 +112,8 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
config += formatConfigAttributeWithConfig(`closeMode: '${closingOption}'`, config);
config += formatConfigAttributeWithConfig(`bubbleState: '${bubbleState}'`, config);
config += formatConfigAttributeWithConfig(`disableMobile: '${disableMobile}'`, config);
config += formatConfigAttributeWithConfig(`hideInputBar: '${hideInputBar}'`, config);
config += formatConfigAttributeWithConfig(`hideEmojis: '${hideEmojis}'`, config);

return `w[n].config = {${config}
};`;
Expand All @@ -135,6 +139,8 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
...(closingOption && {closeMode: closingOption}),
...(bubbleState && {bubbleState: bubbleState}),
...(disableMobile && {disableMobile: disableMobile}),
...(hideInputBar && {hideInputBar: hideInputBar}),
...(hideEmojis && {hideEmojis: hideEmojis}),
},
};

Expand Down Expand Up @@ -391,6 +397,24 @@ export const CustomiseSection = ({channelId, host}: CustomiseSectionProps) => {
}}
/>
</div>
<div className={styles.extraOptions}>
<Toggle
value={hideInputBar}
text="Hide Input Bar"
updateValue={(value: boolean) => {
setHideInputBar(value);
}}
/>
</div>
<div className={styles.extraOptions}>
<Toggle
value={hideEmojis}
text="Disable Emojis"
updateValue={(value: boolean) => {
setHideEmojis(value);
}}
/>
</div>
</div>
<div className={styles.customiseContainer}>
<Input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ kind: ServiceAccount
metadata:
name: airy-admin
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-weight": "-5"
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: airy-admin
annotations:
"helm.sh/hook": "pre-install"
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-weight": "-5"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ metadata:
namespace: {{ .Values.namespace }}
data:
use-forwarded-headers: "true"
{{ if .Values.global.ingress }}
{{ if eq .Values.global.ingress.httpsTermination "LoadBalancer" }}
http-snippet: |
server{
listen 2443;
return 308 https://$host$request_uri;
}
{{ end }}
{{ end }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -96,16 +105,22 @@ spec:
- name: http
containerPort: 80
protocol: TCP
- name: webhook
containerPort: 8443
protocol: TCP
{{ if .Values.global.ingress }}
{{ if .Values.global.ingress.https }}
{{ if eq .Values.global.ingress.httpsTermination "LoadBalancer" }}
- name: tohttps
containerPort: 2443
protocol: TCP
{{ else }}
- name: https
containerPort: 443
protocol: TCP
{{ end }}
{{ end }}
- name: webhook
containerPort: 8443
protocol: TCP
{{ end }}
volumeMounts:
- name: webhook-cert
mountPath: /usr/local/certificates/
Expand Down
Loading

0 comments on commit 4ed7755

Please sign in to comment.