Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for AKS #16

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions client/src/pages/Schedule/ScheduleEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class ScheduleEdit extends React.Component {
const { schedule } = this.state;
this.setState({ isLoading: true });
await this.scheduleService.add(schedule);
// TODO: Save AKS cluster information
this.setState({ isLoading: false });
history.push('/schedules/browser');
} catch (error) {
Expand Down Expand Up @@ -172,6 +173,33 @@ class ScheduleEdit extends React.Component {
onChange={this.handleChange('displayname')}
margin="none"
/>

<TextField
id="aks-cluster-name"
className={classes.textField}
value={schedule.aksClusterName}
label="AKS Cluster Name"
onChange={this.handleChange('aksClusterName')}
margin="none"
/>

<TextField
id="aks-cluster-region"
className={classes.textField}
value={schedule.aksClusterRegion}
label="AKS Cluster Region"
onChange={this.handleChange('aksClusterRegion')}
margin="none"
/>

<TextField
id="aks-cluster-node-count"
className={classes.textField}
value={schedule.aksClusterNodeCount}
label="AKS Cluster Node Count"
onChange={this.handleChange('aksClusterNodeCount')}
margin="none"
/>

<ScheduleTimeZone
selected={schedule.timezone}
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.20
require (
github.com/aws/aws-sdk-go-v2/config v1.18.35
github.com/aws/aws-sdk-go-v2/service/ec2 v1.113.1
github.com/Azure/azure-sdk-for-go v60.0.0+incompatible
github.com/bufbuild/connect-go v1.10.0
github.com/go-redis/redis/v8 v8.11.5
github.com/kelseyhightower/envconfig v1.4.0
Expand Down
71 changes: 71 additions & 0 deletions internal/queue/fake/Interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions internal/queue/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
)

// TODO: implement a more reliable queue

//go:generate mockery --name Interface --output fake --outpkg fake
type Interface interface {
Enqueue(ctx context.Context, v any) error
Dequeue(ctx context.Context, out chan<- string, errChan chan<- error)
Expand Down
213 changes: 213 additions & 0 deletions internal/store/fake/Interface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions internal/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/nduyphuong/gorya/internal/models"
)

//go:generate mockery --name Interface --output fake --outpkg fake
type Interface interface {
SavePolicy(policy models.Policy) error
GetPolicyByName(name string) (*models.Policy, error)
Expand All @@ -14,4 +15,6 @@ type Interface interface {
GetSchedule(name string) (*models.ScheduleModel, error)
ListSchedule() (*[]models.ScheduleModel, error)
DeleteSchedule(name string) error
SaveAKSCluster(cluster azure.AKSCluster) error
GetAKSCluster(name string) (*azure.AKSCluster, error)
}
Loading