Skip to content

Commit 5f0ee96

Browse files
committed
chore(oss): genericize internal infra identifiers and tidy package metadata
Open-source cleanup: replace residual internal identifiers (cosmoslogy contact email, launchql Route53 zone/IAM user, webinc AWS profile, hardcoded *.launchql.dev DNS record, constructive-uploads bucket args) with REPLACE_WITH_* placeholders or configurable Makefile variables. Also drop the contradictory publishConfig.access:restricted from the root package.json and switch every @constructive-io/fn-* package to a proper "license": "MIT" SPDX identifier so npm renders the badge correctly. No runtime/code paths change; only k8s scripts, Makefile defaults, and package.json metadata.
1 parent d3f0cd2 commit 5f0ee96

10 files changed

Lines changed: 22 additions & 20 deletions

File tree

k8s/Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,18 +150,23 @@ proxy-stop:
150150
ZONE_ID ?= REPLACE_WITH_ROUTE53_ZONE_ID
151151
LB_IP ?= REPLACE_WITH_LOAD_BALANCER_IP
152152
AWS_PROFILE ?= default
153+
DNS_RECORD_NAME ?= REPLACE_WITH_DNS_RECORD_NAME
154+
ROUTE53_SECRET_NAME ?= certmgr-route53
155+
UPLOADS_BUCKET ?= REPLACE_WITH_S3_BUCKET_NAME
156+
UPLOADS_IAM_USER ?= REPLACE_WITH_S3_IAM_USER
157+
AWS_REGION ?= us-east-1
153158

154159
aws-route53:
155160
aws route53 change-resource-record-sets \
156161
--profile ${AWS_PROFILE} \
157162
--hosted-zone-id ${ZONE_ID} \
158-
--change-batch "{ \"Changes\": [ {\"Action\":\"UPSERT\",\"ResourceRecordSet\":{\"Name\":\"*.launchql.dev\",\"Type\":\"A\",\"TTL\":60,\"ResourceRecords\":[{\"Value\":\"${LB_IP}\"}]}} ] }"
163+
--change-batch "{ \"Changes\": [ {\"Action\":\"UPSERT\",\"ResourceRecordSet\":{\"Name\":\"${DNS_RECORD_NAME}\",\"Type\":\"A\",\"TTL\":60,\"ResourceRecords\":[{\"Value\":\"${LB_IP}\"}]}} ] }"
159164

160165
k8s-iam-user-secret:
161-
$(KUBECTL) -n $(CONSTRUCTIVE_NS) create secret generic certmgr-route53-launchql \
166+
$(KUBECTL) -n $(CONSTRUCTIVE_NS) create secret generic $(ROUTE53_SECRET_NAME) \
162167
--from-literal=AWS_ACCESS_KEY_ID=$(AWS_ACCESS_KEY_ID) \
163168
--from-literal=AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY)
164169

165170
### aws s3 bucket used for uploads
166171
create-bucket-user:
167-
./scripts/create-uploads-bucket-user-policy.sh constructive-uploads constructive-upload-iam-user us-east-1 webinc
172+
./scripts/create-uploads-bucket-user-policy.sh $(UPLOADS_BUCKET) $(UPLOADS_IAM_USER) $(AWS_REGION) $(AWS_PROFILE)

k8s/overlays/dev/ingress-issuer.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
name: constructive-issuer
55
spec:
66
acme:
7-
email: devops@cosmoslogy.zone # (check typo if meant "cosmology")
7+
email: REPLACE_WITH_ACME_CONTACT_EMAIL
88
server: https://acme-v02.api.letsencrypt.org/directory
99
privateKeySecretRef:
1010
name: constructive-issuer
@@ -15,5 +15,5 @@ spec:
1515
hostedZoneID: REPLACE_WITH_ROUTE53_ZONE_ID
1616
accessKeyID: REPLACE_WITH_ROUTE53_ACCESS_KEY_ID
1717
secretAccessKeySecretRef:
18-
name: certmgr-route53-launchql
18+
name: certmgr-route53
1919
key: AWS_SECRET_ACCESS_KEY

k8s/scripts/aws-route53-iam-user.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
ZONE_ID=Z00381072B5MMXZMWY1JN # launchql.dev
1+
ZONE_ID=REPLACE_WITH_ROUTE53_ZONE_ID
22
ISSUER_NAMESPACE=interweb
33
ISSUER_NAME=launchql-issuer
4-
IAM_USER=certmgr-route53-launchql
5-
AWS_PROFILE=webinc
4+
IAM_USER=certmgr-route53
5+
AWS_PROFILE=default
66

77
# Create the IAM user
88
aws iam create-user --user-name "$IAM_USER" --profile ${AWS_PROFILE}
@@ -49,9 +49,9 @@ echo "SecretAccessKey: $AWS_SECRET_ACCESS_KEY" # store securely!
4949
set -euo pipefail
5050

5151
# Config (override via env vars when calling the script)
52-
: "${ZONE_ID:=Z00381072B5MMXZMWY1JN}" # Hosted Zone ID for your domain
53-
: "${IAM_USER:=certmgr-route53-launchql}"
54-
: "${AWS_PROFILE:=webinc}"
52+
: "${ZONE_ID:?Set ZONE_ID to your Route53 hosted zone ID, e.g. Z0000000000000000000}"
53+
: "${IAM_USER:=certmgr-route53}"
54+
: "${AWS_PROFILE:=default}"
5555
: "${AWS_REGION:=us-east-1}"
5656
POLICY_NAME="route53-dns01-${ZONE_ID}"
5757

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"url": "https://github.com/constructive-io/constructive-functions"
99
},
1010
"license": "MIT",
11-
"publishConfig": {
12-
"access": "restricted"
13-
},
1411
"engines": {
1512
"node": ">=22.0.0"
1613
},

packages/fn-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.6.0",
44
"description": "Express app factory for Knative job functions with callback handling.",
55
"author": "Constructive <developers@constructive.io>",
6-
"license": "SEE LICENSE IN LICENSE",
6+
"license": "MIT",
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",
99
"files": [

packages/fn-cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"description": "Thin command-line wrapper for the Constructive Functions toolkit. Exposes the `fn` executable.",
55
"author": "Constructive <developers@constructive.io>",
6-
"license": "SEE LICENSE IN LICENSE",
6+
"license": "MIT",
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",
99
"bin": {

packages/fn-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"description": "Programmatic client for the Constructive Functions toolkit. Wraps fn-generator with config loading, manifest readers, and child-process orchestration for local dev.",
55
"author": "Constructive <developers@constructive.io>",
6-
"license": "SEE LICENSE IN LICENSE",
6+
"license": "MIT",
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",
99
"files": [

packages/fn-generator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"description": "Programmatic generator for Constructive Functions: walks handler.json manifests and stamps out Dockerfiles, k8s YAML, configmaps, and Skaffold profiles. Pure functions; file I/O at the boundary.",
55
"author": "Constructive <developers@constructive.io>",
6-
"license": "SEE LICENSE IN LICENSE",
6+
"license": "MIT",
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",
99
"files": [

packages/fn-runtime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.2.0",
44
"description": "Runtime for Constructive functions — wraps a handler in an Express app with GraphQL client, logging, and job callback support.",
55
"author": "Constructive <developers@constructive.io>",
6-
"license": "SEE LICENSE IN LICENSE",
6+
"license": "MIT",
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",
99
"files": [

packages/fn-types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"description": "Source-of-truth TypeScript types for the Constructive Functions toolkit: handler manifests, FnConfig, runtime context, registry.",
55
"author": "Constructive <developers@constructive.io>",
6-
"license": "SEE LICENSE IN LICENSE",
6+
"license": "MIT",
77
"main": "dist/index.js",
88
"types": "dist/index.d.ts",
99
"files": [

0 commit comments

Comments
 (0)