Skip to content

Commit

Permalink
Rename stack-aws to provider-aws
Browse files Browse the repository at this point in the history
Signed-off-by: hasheddan <[email protected]>
  • Loading branch information
hasheddan committed Mar 5, 2020
1 parent 75dbab5 commit f9cbf32
Show file tree
Hide file tree
Showing 89 changed files with 250 additions and 234 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ I have:
[documentation]: https://github.com/crossplane/crossplane/tree/master/docs
[examples]: https://github.com/crossplane/crossplane/tree/master/cluster/examples
[release notes]: https://github.com/crossplane/crossplane/tree/master/PendingReleaseNotes.md
[`app.yaml`]: https://github.com/crossplane/stack-aws/blob/master/config/stack/manifests/app.yaml
[`app.yaml`]: https://github.com/crossplane/provider-aws/blob/master/config/stack/manifests/app.yaml
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ linters-settings:
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/crossplane/stack-aws
local-prefixes: github.com/crossplane/provider-aws

gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
Expand Down
30 changes: 15 additions & 15 deletions AUTHENTICATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Authenticating to AWS API

`stack-aws` requires credentials to be provided in order to authenticate to the
`provider-aws` requires credentials to be provided in order to authenticate to the
AWS API. This can be done in one of two ways:

1. Base64 encoding static credentials in a Kubernetes `Secret`. This is
Expand Down Expand Up @@ -37,18 +37,18 @@ Console](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-s
eksctl utils associate-iam-oidc-provider --cluster <cluster-name> --region <region> --approve
```

4. Create IAM Role that stack-aws will use
4. Create IAM Role that provider-aws will use

Set environment variables that will be used in subsequent commands:

```
AWS_ACCOUNT_ID=$(aws2 sts get-caller-identity --query "Account" --output text)
OIDC_PROVIDER=$(aws2 eks describe-cluster --name <cluster-name> --region <region> --query "cluster.identity.oidc.issuer" --output text | sed -e "s/^https:\/\///")
# namespace for stack-aws should match namespace of your ClusterStackInstall
# namespace for provider-aws should match namespace of your ClusterStackInstall
SERVICE_ACCOUNT_NAMESPACE=crossplane-system
# service account name for stack-aws should match name of your ClusterStackInstall
SERVICE_ACCOUNT_NAME=stack-aws
IAM_ROLE_NAME=stack-aws # name for IAM role, can be anything you want
# service account name for provider-aws should match name of your ClusterStackInstall
SERVICE_ACCOUNT_NAME=provider-aws
IAM_ROLE_NAME=provider-aws # name for IAM role, can be anything you want
```

Create trust relationship for IAM role:
Expand Down Expand Up @@ -79,7 +79,7 @@ echo "${TRUST_RELATIONSHIP}" > trust.json
Create IAM role:

```
aws iam create-role --role-name $IAM_ROLE_NAME --assume-role-policy-document file://trust.json --description "IAM role for stack-aws"
aws iam create-role --role-name $IAM_ROLE_NAME --assume-role-policy-document file://trust.json --description "IAM role for provider-aws"
```

Associate a policy with the IAM role. This example uses `AdministratorAccess`,
Expand All @@ -90,7 +90,7 @@ provision your resources.
aws iam attach-role-policy --role-name $IAM_ROLE_NAME --policy-arn=arn:aws:iam::aws:policy/AdministratorAccess
```

5. Install Crossplane and stack-aws
5. Install Crossplane and provider-aws

Install Crossplane from `alpha` channel:

Expand All @@ -101,19 +101,19 @@ helm repo add crossplane-alpha https://charts.crossplane.io/alpha
helm install crossplane --namespace crossplane-system crossplane-alpha/crossplane
```

Install `stack-aws`:
Install `provider-aws`:

```yaml
apiVersion: stacks.crossplane.io/v1alpha1
kind: ClusterStackInstall
metadata:
name: stack-aws # crossplane will create service account with this name
name: provider-aws # crossplane will create service account with this name
namespace: crossplane-system # service account will be created in this namespace
spec:
package: "crossplane/stack-aws:v0.6.0"
package: "crossplane/provider-aws:v0.6.0"
```
6. Enable IAM Role for stack-aws Service Account
6. Enable IAM Role for provider-aws Service Account
First, check to make sure that the appropriate `ServiceAccount` exists:

Expand All @@ -122,7 +122,7 @@ kubectl get serviceaccounts -n crossplane-system
```
If you used the `ClusterStackInstall` above you should see a `ServiceAccount` in
the output named `stack-aws`. You should also see the `stack-aws` controller
the output named `provider-aws`. You should also see the `provider-aws` controller
`Pod` running if you execute `kubectl get pods -n crossplane-system`. To inject
the credential information into the Pod, we must annotate its `ServiceAccount`
with the desired IAM role:
Expand All @@ -140,7 +140,7 @@ it:
kubectl delete pod <pod-name> -n crossplane-system
```
You should immediately see another `Pod` be created for the `stack-aws`
You should immediately see another `Pod` be created for the `provider-aws`
controller. It will have access to credentials used to assume the IAM role.
7. Create `Provider`
Expand All @@ -162,4 +162,4 @@ EOF
kubectl apply -f aws-provider.yaml
```
You can now reference this `Provider` to provision any `stack-aws` resources.
You can now reference this `Provider` to provision any `provider-aws` resources.
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Building and Installing the Crossplane AWS Stack

`stack-aws` is composed of a golang project and can be built directly with standard `golang` tools. We currently support two different platforms for building:
`provider-aws` is composed of a golang project and can be built directly with standard `golang` tools. We currently support two different platforms for building:

* Linux: most modern distros should work although most testing has been done on Ubuntu
* Mac: macOS 10.6+ is supported
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipeline {
DOCKER = credentials('dockerhub-upboundci')
AWS = credentials('aws-upbound-bot')
GITHUB_UPBOUND_BOT = credentials('github-upbound-jenkins')
CODECOV_TOKEN = credentials('codecov-stack-aws')
CODECOV_TOKEN = credentials('codecov-provider-aws')
}

stages {
Expand All @@ -26,7 +26,7 @@ pipeline {
steps {
script {
if (env.CHANGE_ID != null) {
def json = sh (script: "curl -s https://api.github.com/repos/crossplane/stack-aws/pulls/${env.CHANGE_ID}", returnStdout: true).trim()
def json = sh (script: "curl -s https://api.github.com/repos/crossplane/provider-aws/pulls/${env.CHANGE_ID}", returnStdout: true).trim()
def body = evaluateJson(json,'${json.body}')
if (body.contains("[skip ci]")) {
echo ("'[skip ci]' spotted in PR body text.")
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ====================================================================================
# Setup Project

PROJECT_NAME := stack-aws
PROJECT_NAME := provider-aws
PROJECT_REPO := github.com/crossplane/$(PROJECT_NAME)

PLATFORMS ?= linux_amd64 linux_arm64
Expand Down Expand Up @@ -49,7 +49,7 @@ STACK_PACKAGE_REGISTRY=$(STACK_PACKAGE)/.registry
STACK_PACKAGE_REGISTRY_SOURCE=config/stack/manifests

DOCKER_REGISTRY = crossplane
IMAGES = stack-aws
IMAGES = provider-aws
-include build/makelib/image.mk

# ====================================================================================
Expand Down
2 changes: 1 addition & 1 deletion PROJECT
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version: "1"
domain: crossplane.io
repo: github.com/crossplane/stack-aws
repo: github.com/crossplane/provider-aws
54 changes: 35 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,69 @@
# Stack-AWS
# provider-aws

## Overview

This `stack-aws` repository is the implementation of a Crossplane infrastructure
[stack](https://github.com/crossplane/crossplane/blob/master/design/design-doc-stacks.md) for
[Amazon Web Services (AWS)](https://aws.amazon.com).
The stack that is built from the source code in this repository can be installed into a Crossplane control plane and adds the following new functionality:
This `provider-aws` repository is the Crossplane infrastructure provider for
[Amazon Web Services (AWS)](https://aws.amazon.com). The provider that is built
from the source code in this repository can be installed into a Crossplane
control plane and adds the following new functionality:

* Custom Resource Definitions (CRDs) that model AWS infrastructure and services (e.g. [Amazon Relational Database Service (RDS)](https://aws.amazon.com/rds/), [EKS clusters](https://aws.amazon.com/eks/), etc.)
* Controllers to provision these resources in AWS based on the users desired state captured in CRDs they create
* Implementations of Crossplane's [portable resource abstractions](https://crossplane.io/docs/master/running-resources.html), enabling AWS resources to fulfill a user's general need for cloud services
* Custom Resource Definitions (CRDs) that model AWS infrastructure and services
(e.g. [Amazon Relational Database Service (RDS)](https://aws.amazon.com/rds/),
[EKS clusters](https://aws.amazon.com/eks/), etc.)
* Controllers to provision these resources in AWS based on the users desired
state captured in CRDs they create
* Implementations of Crossplane's [portable resource
abstractions](https://crossplane.io/docs/master/running-resources.html),
enabling AWS resources to fulfill a user's general need for cloud services

## Getting Started and Documentation

For getting started guides, installation, deployment, and administration, see our [Documentation](https://crossplane.io/docs/latest).
For getting started guides, installation, deployment, and administration, see
our [Documentation](https://crossplane.io/docs/latest).

## Contributing

Stack-AWS is a community driven project and we welcome contributions.
See the Crossplane [Contributing](https://github.com/crossplane/crossplane/blob/master/CONTRIBUTING.md) guidelines to get started.
provider-aws is a community driven project and we welcome contributions. See the
Crossplane
[Contributing](https://github.com/crossplane/crossplane/blob/master/CONTRIBUTING.md)
guidelines to get started.

## Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please open an [issue](https://github.com/crossplane/stack-aws/issues).
For filing bugs, suggesting improvements, or requesting new features, please
open an [issue](https://github.com/crossplane/provider-aws/issues).

## Contact

Please use the following to reach members of the community:

* Slack: Join our [slack channel](https://slack.crossplane.io)
* Forums: [crossplane-dev](https://groups.google.com/forum/#!forum/crossplane-dev)
* Forums:
[crossplane-dev](https://groups.google.com/forum/#!forum/crossplane-dev)
* Twitter: [@crossplane_io](https://twitter.com/crossplane_io)
* Email: [[email protected]](mailto:[email protected])

## Roadmap

Stack-AWS goals and milestones are currently tracked in the Crossplane repository.
More information can be found in [ROADMAP.md](https://github.com/crossplane/crossplane/blob/master/ROADMAP.md).
provider-aws goals and milestones are currently tracked in the Crossplane
repository. More information can be found in
[ROADMAP.md](https://github.com/crossplane/crossplane/blob/master/ROADMAP.md).

## Governance and Owners

Stack-AWS is run according to the same [Governance](https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md) and [Ownership](https://github.com/crossplane/crossplane/blob/master/OWNERS.md) structure as the core Crossplane project.
provider-aws is run according to the same
[Governance](https://github.com/crossplane/crossplane/blob/master/GOVERNANCE.md)
and [Ownership](https://github.com/crossplane/crossplane/blob/master/OWNERS.md)
structure as the core Crossplane project.

## Code of Conduct

Stack-AWS adheres to the same [Code of Conduct](https://github.com/crossplane/crossplane/blob/master/CODE_OF_CONDUCT.md) as the core Crossplane project.
provider-aws adheres to the same [Code of
Conduct](https://github.com/crossplane/crossplane/blob/master/CODE_OF_CONDUCT.md)
as the core Crossplane project.

## Licensing

Stack-AWS is under the Apache 2.0 license.
provider-aws is under the Apache 2.0 license.

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcrossplane%2Fstack-aws.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fcrossplane%2Fstack-aws?ref=badge_large)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcrossplane%2Fprovider-aws.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fcrossplane%2Fprovider-aws?ref=badge_large)
16 changes: 8 additions & 8 deletions apis/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ package apis
import (
"k8s.io/apimachinery/pkg/runtime"

cachev1beta1 "github.com/crossplane/stack-aws/apis/cache/v1beta1"
computev1alpha3 "github.com/crossplane/stack-aws/apis/compute/v1alpha3"
databasev1alpha3 "github.com/crossplane/stack-aws/apis/database/v1alpha3"
databasev1beta1 "github.com/crossplane/stack-aws/apis/database/v1beta1"
identityv1alpha3 "github.com/crossplane/stack-aws/apis/identity/v1alpha3"
networkv1alpha3 "github.com/crossplane/stack-aws/apis/network/v1alpha3"
storagev1alpha3 "github.com/crossplane/stack-aws/apis/storage/v1alpha3"
awsv1alpha3 "github.com/crossplane/stack-aws/apis/v1alpha3"
cachev1beta1 "github.com/crossplane/provider-aws/apis/cache/v1beta1"
computev1alpha3 "github.com/crossplane/provider-aws/apis/compute/v1alpha3"
databasev1alpha3 "github.com/crossplane/provider-aws/apis/database/v1alpha3"
databasev1beta1 "github.com/crossplane/provider-aws/apis/database/v1beta1"
identityv1alpha3 "github.com/crossplane/provider-aws/apis/identity/v1alpha3"
networkv1alpha3 "github.com/crossplane/provider-aws/apis/network/v1alpha3"
storagev1alpha3 "github.com/crossplane/provider-aws/apis/storage/v1alpha3"
awsv1alpha3 "github.com/crossplane/provider-aws/apis/v1alpha3"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions apis/compute/v1alpha3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
"github.com/crossplane/crossplane-runtime/pkg/resource"

identity "github.com/crossplane/stack-aws/apis/identity/v1alpha3"
network "github.com/crossplane/stack-aws/apis/network/v1alpha3"
identity "github.com/crossplane/provider-aws/apis/identity/v1alpha3"
network "github.com/crossplane/provider-aws/apis/network/v1alpha3"
)

// Cluster statuses.
Expand Down
2 changes: 1 addition & 1 deletion apis/database/v1alpha3/dbsubnetgroup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/rds"
"github.com/onsi/gomega"

aws "github.com/crossplane/stack-aws/pkg/clients"
aws "github.com/crossplane/provider-aws/pkg/clients"
)

func Test_DBSubnetGroup_BuildExternalStatusFromObservation(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions apis/database/v1alpha3/dbsubnetgroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"github.com/aws/aws-sdk-go-v2/service/rds"
"github.com/pkg/errors"

network "github.com/crossplane/stack-aws/apis/network/v1alpha3"
aws "github.com/crossplane/stack-aws/pkg/clients"
network "github.com/crossplane/provider-aws/apis/network/v1alpha3"
aws "github.com/crossplane/provider-aws/pkg/clients"

runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
"github.com/crossplane/crossplane-runtime/pkg/resource"
Expand Down
6 changes: 3 additions & 3 deletions apis/database/v1beta1/rdsinstance_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
"github.com/crossplane/crossplane-runtime/pkg/resource"

databasev1alpha3 "github.com/crossplane/stack-aws/apis/database/v1alpha3"
identityv1alpha3 "github.com/crossplane/stack-aws/apis/identity/v1alpha3"
network "github.com/crossplane/stack-aws/apis/network/v1alpha3"
databasev1alpha3 "github.com/crossplane/provider-aws/apis/database/v1alpha3"
identityv1alpha3 "github.com/crossplane/provider-aws/apis/identity/v1alpha3"
network "github.com/crossplane/provider-aws/apis/network/v1alpha3"
)

// Error strings
Expand Down
2 changes: 1 addition & 1 deletion apis/database/v1beta1/rdsinstance_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/crossplane/crossplane-runtime/pkg/resource"
"github.com/crossplane/crossplane-runtime/pkg/test"

aws "github.com/crossplane/stack-aws/pkg/clients"
aws "github.com/crossplane/provider-aws/pkg/clients"
)

var _ resource.AttributeReferencer = (*VPCSecurityGroupIDReferencerForRDSInstance)(nil)
Expand Down
2 changes: 1 addition & 1 deletion apis/identity/v1alpha3/iamrole_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"github.com/aws/aws-sdk-go-v2/service/iam"

aws "github.com/crossplane/stack-aws/pkg/clients"
aws "github.com/crossplane/provider-aws/pkg/clients"

runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
)
Expand Down
2 changes: 1 addition & 1 deletion apis/identity/v1alpha3/iamrolepolicyattachment_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

"github.com/pkg/errors"

aws "github.com/crossplane/stack-aws/pkg/clients"
aws "github.com/crossplane/provider-aws/pkg/clients"
)

// Error strings
Expand Down
2 changes: 1 addition & 1 deletion apis/identity/v1alpha3/identity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/iam"
"github.com/onsi/gomega"

aws "github.com/crossplane/stack-aws/pkg/clients"
aws "github.com/crossplane/provider-aws/pkg/clients"
)

func TestMain(m *testing.M) {
Expand Down
2 changes: 1 addition & 1 deletion apis/network/v1alpha3/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/onsi/gomega"

aws "github.com/crossplane/stack-aws/pkg/clients"
aws "github.com/crossplane/provider-aws/pkg/clients"
)

func TestMain(m *testing.M) {
Expand Down
2 changes: 1 addition & 1 deletion apis/network/v1alpha3/securitygroup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/pkg/errors"

aws "github.com/crossplane/stack-aws/pkg/clients"
aws "github.com/crossplane/provider-aws/pkg/clients"

runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
"github.com/crossplane/crossplane-runtime/pkg/resource"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include ../../../build/makelib/common.mk

# ====================================================================================
# Options
IMAGE = $(BUILD_REGISTRY)/stack-aws-$(ARCH)
IMAGE = $(BUILD_REGISTRY)/provider-aws-$(ARCH)
include ../../../build/makelib/image.mk

# ====================================================================================
Expand Down
2 changes: 1 addition & 1 deletion cluster/local/integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ STACK_IMAGE="${DOCKER_REGISTRY}/${PROJECT_NAME}:master"
K8S_CLUSTER="${K8S_CLUSTER:-${BUILD_REGISTRY}-INTTESTS}"

CROSSPLANE_NAMESPACE="crossplane-system"
STACK_NAME="stack-aws"
STACK_NAME="provider-aws"
STACK_NAMESPACE="aws"

# cleanup on exit
Expand Down
Loading

0 comments on commit f9cbf32

Please sign in to comment.