-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from yjinjo/master
Add helm chart and Dockerfile
- Loading branch information
Showing
6 changed files
with
173 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,3 +75,70 @@ jobs: | |
status: ${{job.status}} | ||
fields: repo,workflow,job | ||
author_name: Github Action Slack | ||
|
||
docker: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.PAT_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.CLOUDFORET_DEV_DOCKER_USERNAME }} | ||
password: ${{ secrets.CLOUDFORET_DEV_DOCKER_PASSWORD }} | ||
|
||
- name: Build and push to dockerhub | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: ${{ env.ARCH }} | ||
push: true | ||
tags: cloudforet/${{ github.event.repository.name }}:${{ env.VERSION }} | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: us-east-1 | ||
|
||
- name: Login to Amazon ECR | ||
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${{ secrets.ECR_REPO }} | ||
|
||
- name: Build and push to ECR | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: ${{ env.ARCH }} | ||
push: true | ||
tags: ${{ secrets.ECR_REPO }}/${{ github.event.repository.name }}:${{ env.VERSION }} | ||
|
||
- name: Notice when job fails | ||
if: failure() | ||
uses: 8398a7/[email protected] | ||
with: | ||
status: ${{job.status}} | ||
fields: repo,workflow,job | ||
author_name: Github Action Slack | ||
|
||
notification: | ||
needs: docker | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Slack | ||
if: always() | ||
uses: 8398a7/[email protected] | ||
with: | ||
status: ${{job.status}} | ||
fields: repo,message,commit,author,action,ref,workflow,job | ||
author_name: Github Action Slack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Build stage | ||
FROM golang:1.23-alpine AS builder | ||
|
||
WORKDIR /app | ||
|
||
# Install required build tools | ||
RUN apk add --no-cache git | ||
|
||
# Copy go mod files | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
# Copy source code | ||
COPY . . | ||
|
||
# Build binary | ||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o cfctl . | ||
|
||
# Final stage | ||
FROM alpine:3.19 | ||
|
||
WORKDIR /app | ||
|
||
# Install CA certificates for HTTPS | ||
RUN apk --no-cache add ca-certificates | ||
|
||
# Copy binary from builder | ||
COPY --from=builder /app/cfctl . | ||
|
||
# Create directory for configuration | ||
RUN mkdir -p /root/.spaceone | ||
|
||
# Set environment variable | ||
ENV CFCTL_DEFAULT_ENVIRONMENT=default | ||
|
||
# Set entrypoint | ||
ENTRYPOINT ["/app/cfctl"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
# cfctl | ||
# cfctl - Command Line Interface for SpaceONE | ||
|
||
cfctl is a powerful command-line interface tool designed to interact with SpaceONE services. It provides a seamless way to manage and control your SpaceONE resources through the command line. | ||
|
||
## Features | ||
|
||
- **Dynamic Service Discovery**: Automatically discovers and interacts with available SpaceONE services | ||
- **Multi-Environment Support**: Manages multiple environments (user/app) with easy switching | ||
- **Secure Authentication**: Supports both user and application token-based authentication | ||
- **Rich Output Formats**: Supports various output formats including table, yaml, json, and csv | ||
- **Short Names**: Configurable resource aliases for faster command execution | ||
|
||
## Installation | ||
|
||
### Using Homebrew (macOS) | ||
|
||
```bash | ||
brew tap cloudforet-io/tap | ||
brew install cfctl | ||
``` | ||
|
||
### Manual Installation | ||
|
||
Download the latest binary from [releases page](https://github.com/cloudforet-io/cfctl/releases) | ||
|
||
## Quick Start | ||
|
||
1. Initialize cfctl configuration: | ||
|
||
```bash | ||
cfctl setting init | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters